Colours, on the embedded table
Closed this issue · 12 comments
Notes from client:
Just like we currently calculate red, yellow and green, then:
If indicators PBS-6, EBP-6, EB-6, IYR-6, MYR-6, YER-6, and AR-6 received an “a” or “b” response, then the dots for those documents should be orange. Also, if CB-2 received “e”, the dot for the Citizens Budget should also be orange.
@dumyan is this possible?
I'm unable to identify what the number after the document acronyms represents. Can I have a clarification on this one?
You'll have to check how the current colors are generated - are there not similar codes that are ultimately assigned to one color or another? if not, please describe how the colors are generated.
The colors are defined for the four possible document states in the CSS. So it will be easy to change and/or add new colors if I can identify the document state described.
@dumyan can you show me a sample of the example data and then code that creates each of the existing colors please.
For example this is one document object that gets evaluated for the table on the home page:
{
"state": "available",
"title": "Draft of the State Budget ",
"type": "Executive's Budget Proposal",
"approved": true,
"date_published": "02 Oct 2015",
"date_received": "09 Oct 2015",
"comments": "The document is also available on the website of the Armenian Ministry of Finance (see http://minfin.am/index.php?art=1847&lang=1). However, on the website of the National Assembly together with the Budget Statement and Draft Law on 2016 State Budget, whereas on the website of the National Assembly there are also the Conclusion of the Central Bank of the Republic of Armenia on the 2016 draft budget (file K-862_KB_1.pdf), which is the integral part of EBP and Conclusion of the Government of the Republic of Armenia on the Central Bank's Budget Estimate and Capital Investment Program fro 2016 (file K-862_KB.pdf)."
}
In the template, this object is contained in cell
and used like this:
<span class="badge state state-{{ cell.state|replace(' ', '-') }}">
The state
field is concatenated with state-
string to form some of the CSS rules defined here:
&.state-late {
background-color: lighten(@state-color-late, 15%) !important;
border-color: darken(@state-color-late, 15%) !important;
}
&.state-not-produced {
background-color: lighten(@state-color-not-produced, 15%) !important;
border-color: darken(@state-color-not-produced, 15%) !important;
}
&.state-internal {
background-color: lighten(@state-color-internal, 15%) !important;
border-color: darken(@state-color-internal, 15%) !important;
}
&.state-available {
background-color: lighten(@state-color-available, 15%) !important;
border-color: darken(@state-color-available, 15%) !important;
}
And state colors are defined as this:
@state-color-late: #CA2222;
@state-color-not-produced: @state-color-late;
@state-color-internal: #F5DD0C;
@state-color-available: #28C926;
@dumyan ok, the change is easy:
- not produced: red
- late: orange (choose a nice orange :))
please do a quick PR for this, this morning
ok, the client has asked us to hold on this. So, push the work as a branch, and PR it, but we will not merge yet.
@dumyan ok, the request has completely changed ( cc @jobarratt ):
Please let me know if this is possible, and an estimate on how much work:
From the client
msg 1
Regarding the colored dots, we got a response from the team. Here is the decision:
We stick with three colors, but we make a few changes on what each color means (only starting from this Tracker update, so we do not plan to change the dots retrospectively).
-
Green will be used for documents that are published as per the OBS criteria (online, and within the right time frame)
-
Yellow will be used for documents that are produced for internal use (as it has been done till now), but also for Hard Copy and Soft Copy, and for documents that are Published Late.
-
Red is only used for documents that are not produced at all.
While we were discussing, a question came up, and I am including it here, for you to tell me whether it’s feasible, and at (roughly) what additional time/cost. My sense is that, if it requires a lot of additional work, we will save this for the next publication. The request was to have a “hover over” feature, so that for the documents with a yellow dot we can provide a little more information on why it’s yellow (PL, HC, SC, IU). This would not be required for the other two colors because they only mean one thing.
msg 2
I actually have a correction to the “hover over” feature, as David rightly reminded me that we did have a “hover over” feature in the Tracker site! So the assumption would be that this feature from the Tracker website is also carried over with this integration.
At the moment when one hovers over dots in the Tracker website, this is what shows up:
· P – “COUNTRY: DOCUMENT is publicly available and was published on DATE”
· IU – “COUNTRY: DOCUMENT is produced and available for internal use only”
· PL – “COUNTRY: DOCUMENT was published late and was published on DATE”
· NP – “COUNTRY: DOCUMENT is not produced”
If this is the case, you guys would just need to know what text to use for HC/SC documents. Is this a correct understanding?
PS. The slightly odd formatting (COUNTRY: DOCUMENT), is because we had to make sure the hover-over text made sense in all the translated languages.