Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Agency Selection page #1197

Closed
2 tasks
angela-tran opened this issue Jan 12, 2023 · 3 comments · Fixed by #1206
Closed
2 tasks

Implement Agency Selection page #1197

angela-tran opened this issue Jan 12, 2023 · 3 comments · Fixed by #1206
Assignees
Labels
back-end Django views, sessions, middleware, models, migrations etc. front-end HTML/CSS/JavaScript and Django templates

Comments

@angela-tran
Copy link
Member

angela-tran commented Jan 12, 2023

This task is to implement the agency selection based off the notes from #1090 (comment) and the designs in Figma (once they are finalized).

The backend code will need to change to support this - see the approach outlined in #1197 (comment)

Other ideas that we considered

@thekaveman and I paired a bit to talk through ideas for implementation. Those ideas were:

  • a form-based approach, where each card is actually a submit button for a form with a hidden input - the form would need to be handled by /eligibility
  • a link-based approach, where each card links to a new URL whose view function simply sets the session agency and forwards to /eligibility
  • a link-based approach, where each card links to the existing agency_index URL but with the addition of a query parameter so that agency_index can know to forward to /eligibility - can be something like ?select=true

Acceptance Criteria

  • Agency Selection page matches finalized design in Figma
  • The user can enter the site from either the index (/) or an agency's index page (e.g. /mst)

Additional context

@angela-tran angela-tran added front-end HTML/CSS/JavaScript and Django templates back-end Django views, sessions, middleware, models, migrations etc. labels Jan 12, 2023
@thekaveman
Copy link
Member

@angela-tran your comment got me thinking about the approach we landed on, and I have yet another idea that is kind of a variation on the second and third options:

/eligibility currently has middleware that requires an agency in the session. The idea is to remove that requirement, and update the URL pattern to allow an (optional) agency slug parameter. So we could have both of these URLs:

  • /eligibility
  • /eligibility/mst

The former would assume agency is in the session (and throw an exception if not, just like now); the latter would get the agency as an argument to the view function.

This option is similar to how we do e.g. agency selection via URLs already, and avoids the use of the querystring. Thoughts?

@angela-tran
Copy link
Member Author

This option is similar to how we do e.g. agency selection via URLs already, and avoids the use of the querystring. Thoughts?

I like that the cards would be more directly linking to the page they want, that this doesn't add a new URL (just builds upon an existing one), and that it's more consistent with how we're selecting agencies. I think this is better!

@thekaveman
Copy link
Member

thekaveman commented Jan 13, 2023

Final designs provided: https://cal-itp.slack.com/archives/C013W8RUAMU/p1673631693341459

@thekaveman asks:

is the expectation that the modal is opened by default when the user lands on the homepage, or should they have to click the button to open the modal?

@srhhnry responds:

the user has to click the CTA to open the modal. We also added a previous page button on /eligibility and an x on the modal. The concept with those three interactions is to give the user control over the modal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Django views, sessions, middleware, models, migrations etc. front-end HTML/CSS/JavaScript and Django templates
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants