- When user logs in, they'll end up on the 'My Programs' page which lists programs which they are admins for.
- Mock - https://commons.wikimedia.org/wiki/File:Grant_metrics_1_-_My_programs.png
- Programs ordered in descending order of end date/time.
- Clicking on 'Add a new program' on this page leads them to the 'Create program' page.
- Mock - https://meta.wikimedia.org/wiki/Community_Tech/Grant_metrics_tool#/media/File:Create_new_program.png
- We run a (re)check on the username(s) when the username input field loses focus.
- Note this includes using the API to ensure valid usernames are entered. Also note that this same functionality will be needed when usernames are entered as program participants.
- Clicking on the gear icon leads them to 'Update program' page which is a replica of the 'Create program page' with pre-populated program data.
- Mock - same as above.
Description
Related Objects
- Mentioned In
- T179541: View events in Grant metrics
Event Timeline
@MusikAnimal Everything in this ticket is open for discussion/clarification. Anything here you feel like we should break up in to a new ticket?
Looks good! They might each be a separate ticket, but the latter two at least will probably share the same view.
Regarding this mock: Since we are adding organizers one by one, we might consider using autocompletion to prevent the possibility of errors. You'd still need to validate on-save in the event they have JavaScript disabled -- but in my opinion every web app should have a big <noscript>No JavaScript, no service!</noscript> because it's almost 2018 :)
Autocompletion sounds good but we can have that in a separate ticket as a nice-to-have once we're done with the basics.
And yes, we'd need server-side validation in any case. I'll move that to a new ticket as well since I'm guessing you can abstract form validation (and response handling) such that you can reuse it in other parts of the application where required. For reference this file does the form handling and validation for the iegreview application that Bryan and I worked on sometime back.
Here's the giant commit for the "Create program" page: https://github.com/wikimedia/grantmetrics/commit/20fbe4f49575a22cb62eda196b45337c69522069
That also includes all the requisite work for the models, repositories, form creation, tests, and so forth. The commit for the "My programs" landing page (and other pages) will be much smaller!
OAuth login was also introduced, because we needed a user to attribute the program to. I'll add the thingy that CopyPatrol uses to keep you logged in.
I believe this is more or less done, but we're running into a bug in production where you can't create a program with 3 or more organizers. This is to me is quite bizarre, and I can't repro locally even when running in the production environment. I spent an hour or so trying to figure it out and have side-stepped it for the time being.
Code related to this task is scattered amongst a number of commits. If you wanted to comment, do so on some of the more recent ones, as things have changed quite a bit: