-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add multiselect projects field to state calculator #21
Conversation
## Description This implements most of the spec'd design. There are some significant pieces still missing. They're tracked in Asana, but just as a summary: - Multiple selection of projects. - Adding authority logos to the bottom of the page. - Handling the case of entering a location outside RI. - Adding an optional email field for people to join the mailing list. In addition, there are some more pieces missing before this frontend is ready to replace the existing IRA calculator wholesale: - Spanish localization - Analytics - Appearance customizability via CSS ### Guide to new code - New .html page for the RI calculator, which pretty much just has the embed. It's included in the Parcel targets, which means it will be built and deployed. It's not ready for the public yet, so it uses a meta tag to disable search engine indexing. - `state-calculator.ts` is the custom HTML element. This contains all the state management. - `state-incentive-details.ts` is the view layer. - A couple of sub-parts are factored out: `utility-selector.ts` and `icon-tab-bar.ts`. - `calculator-types-v1.ts` corresponds to the shape of the API responses. This is manually maintained right now, not generated from the API in any way; eventually it'd be good to change that. - `projects.ts` has icons and labels for the various projects. ## Test Plan - Enter a RI zip code. 02807 for Block Island, 02861 for Providence (RI Energy only), 02814 for Pascoag (RIE and PUD available). - Fill in the rest of the form, click Calculate. Look at results. In the 02814 case, switch to the other utility and make sure the incentives reload. - Click the pill buttons to switch projects. - Click the "Learn more" / "Visit site" buttons. Resize the window to look at the three possible layouts. (1, 2, or 3 columns of incentive cards.)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From playing with the Vercel preview I think this is in a good state, but could you do a rebase / resolve conflicts? The diff now shows a bunch of changes from me landing the RI work on main.
@RandomEtc I have fixed this behavior so that if you hit tab on the open multiselect, it closes the dropdown but stays focused on the select and if you hit tab again it moves on to the next box (the zip). |
@oyamauchi Did a rebase, please take a look again! |
Nice! Looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behavior seems right from playing with the preview, so let's do it!
(Side note: it's wild to me that you had to go to all that effort to get the focus behavior right... I really wonder why we're not getting this behavior out of the box)
Yeah, I asked the Shoelace creator about it and he said that the default behavior should be what I've corrected it to. I suspect there might be some tricky nuance in how shoelace elements interact with native html elements. |
Added a multiselect option for the interested projects field in the state calculator, leveraging shoelace (https://shoelace.style/components/select).