-
Notifications
You must be signed in to change notification settings - Fork 952
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
Feat: New Feature Popover #7302
base: master
Are you sure you want to change the base?
Conversation
2620c48
to
937676a
Compare
937676a
to
12a58ca
Compare
@tonypls This PR still needs some tests, but you can take a look at the code whenever you have time |
d1b3b4f
to
0b878b6
Compare
9c981c9
to
d90a014
Compare
d90a014
to
e71845f
Compare
e71845f
to
f901fe1
Compare
- adds new feature component - adds content for data picker popover - adds content for new price popover
ca3aba8
to
eeccdc3
Compare
eeccdc3
to
bb930b6
Compare
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.
Looks really good! Just a couple of questions and comments
web/src/locales/en.json
Outdated
"new-feature-popover": { | ||
"title": "Select a Date to Explore", | ||
"content": "Use the date picker to view historical data on electricity sources, CO2 emissions, and prices." | ||
}, |
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.
Do you think we should add another layer in this if we will add more feature popovers in the future?
Maybe something like this:
"new-feature-popover": { | |
"title": "Select a Date to Explore", | |
"content": "Use the date picker to view historical data on electricity sources, CO2 emissions, and prices." | |
}, | |
"new-feature-popover": { | |
"date-picker": { | |
"title": "Select a Date to Explore," | |
"content": "Use the date picker to view historical data on electricity sources, CO2 emissions, and prices." | |
}, | |
}, |
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.
I think we're only adding a single new feature popover for now, since we don't want to overwhelm the user with a bunch of popovers when they first arrive
web/src/features/time/TimeHeader.tsx
Outdated
<NewFeaturePopover | ||
side="top" | ||
content={<NewFeaturePopoverContent />} | ||
portal={false} | ||
> |
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.
This should not be showing until we actually implement it. Meanwhile, should we just add it in a FF or what do you think?
Also, do you think we should add an end date for when it should not show up for any users anymore? e.g a month after the release of the new feature?
web/src/features/time/TimeHeader.tsx
Outdated
const [isLoadingMap] = useAtom(loadingMapAtom); | ||
|
||
const allLoaded = !isLoadingMap && !isLoadingData; |
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.
Why is this needed when it wasn't before?
If it is needed, then we could use useAtomValue to match the other atom values in the component
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.
At the time I originally wrote this, the popover was displaying over the loading screen. However, that no longer seems to be an issue, so I will remove the isLoadingMap check
EDIT: I think it's because I removed portal as the default behavior on the popover
<h3>{t(`new-feature-popover.title`)}</h3> | ||
</div> | ||
<p>{t(`new-feature-popover.content`)}</p> |
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.
Depending on how we decide to do the translation (see en.json comment), then it might be necessary to give the translation strings as props
877bf7a
to
243618e
Compare
Will make a follow up PR to automatically dismiss the popover if someone clicks elsewhere on the app |
@silkeholmebonnen @tonypls would y'all please take another look at this PR? Thanks! |
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.
Copilot reviewed 6 out of 8 changed files in this pull request and generated no suggestions.
Files not reviewed (2)
- web/package.json: Language not supported
- web/src/locales/en.json: Language not supported
@cadeban to fix the lockfile just merge master and run pnpm install before committing it to git. PNPM has built in merge resolution for the lockfiles :) |
Description
AVO-554: We have a lot of planned changes for our app, and we need a way to let people know about all of our cool new features.
Changes:
Todo:
Open for discussion:
Preview
Date Picker example (portal):
Future Price example (non-portal):
*Note how the in the non-portal version the popover is behind the TimeController
Dark mode:
Double check
poetry run test_parser "zone_key"
pnpx prettier@2 --write .
andpoetry run format
in the top level directory to format my changes.