Closed edwardchalstrey1 closed 5 years ago
Looking good and runs for me, thanks! Few quick thoughts:
Could you add a white background colour to the table (at least the row/column headers), rather than it being transparent like it is now, so that when you scroll you don't see the content of the other cells behind the headers? You can stick background-color: white
in the relevant CSS blocks. Might be nice to play with adding bold text for headers, and (centre?) justification of everything to make the table a bit prettier too.
Can all the functions that use/create an fc
object in preferences_availability.py optionally be passed a previously created fc
instance? E.g. def get_all_preferences_table(fc=None):
, then if fc is None make a new one, else use the given one. Then in the app the same fc object can be used for everything (in the current version of app.py the harvest api ends up being queried for the data twice).
Could you add a link to the new /preferences end-point in the string returned by the home
function in app.py (so it appears as an option on the "home page")?
Looking good and runs for me, thanks! Few quick thoughts:
- Could you add a white background colour to the table (at least the row/column headers), rather than it being transparent like it is now, so that when you scroll you don't see the content of the other cells behind the headers? You can stick
background-color: white
in the relevant CSS blocks. Might be nice to play with adding bold text for headers, and (centre?) justification of everything to make the table a bit prettier too.- Can all the functions that use/create an
fc
object in preferences_availability.py optionally be passed a previously createdfc
instance? E.g.def get_all_preferences_table(fc=None):
, then if fc is None make a new one, else use the given one. Then in the app the same fc object can be used for everything (in the current version of app.py the harvest api ends up being queried for the data twice).- Could you add a link to the new /preferences end-point in the string returned by the
home
function in app.py (so it appears as an option on the "home page")?
Not sure where to get the fc
object from in app.py where get_all_preferences_table()
is called on line 80? It can now be passed one though: get_all_preferences_table(fc=fc)
Do you think we should include the following info alongside the project titles:
The fc object is hidden inside the Visualise instance - you should be able to pass in vis.fc (if you move the preference table stuff after vis is made).
Would be nice to add links to the projects - on the whiteboard I do that by putting the project names in a <a href=issue_url>project_name</a>
.
Having a page title including the date range would be nice too 🙂
I noticed in the query string we have users(first:20)
which I assume means we're only getting the first 20 emojis back. That's probably safe for now but won't be future-proof as the team grows.
Could we look at either:
Or
In both cases would need to check how much the API will return in one query and how we can split a request across multiple queries if necessary.
For this to be compatible with the dev/27-database branch (which I hope to make master soon) these changes will be needed:
from wimbledon.vis.Visualise import DataHandlers
is replaced by from wimbledon import Wimbledon
fc
names should be changed to wim
peopledf = 1 - fc.people_totals
can be replaced with wim.people_free_capacity
fc.projects['GitHub']
is now wim.projects['github']
fc = DataHandlers.Forecast()
should now be wim = Wimbledon(update_db=True, with_tracked_time=False)
For this to be compatible with the dev/27-database branch (which I hope to make master soon) these changes will be needed:
from wimbledon.vis.Visualise import DataHandlers
is replaced byfrom wimbledon import Wimbledon
fc
names should be changed towim
peopledf = 1 - fc.people_totals
can be replaced withwim.people_free_capacity
fc.projects['GitHub']
is nowwim.projects['github']
fc = DataHandlers.Forecast()
should now bewim = Wimbledon(update_db=True, with_tracked_time=False)
Let me know when you have merged your branch with master, then I can rebase this branch on master and test it's working after making those edits
@jack89roberts opening the PR now, but will refactor before merge ready
TODO: