-
Notifications
You must be signed in to change notification settings - Fork 5
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
Premium Credits UI #311
Premium Credits UI #311
Conversation
✅ Deploy Preview for documentcloud-frontend ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Just a heads up that I'm going to merge in my work on the top bar to this PR as well—they both use the same API calls. While this makes for a weightier review, it avoids shipping multiple PRs that depend on the same sets of API calls (and expect API changes). |
15aa9ab
to
d76ce26
Compare
d76ce26
to
fde5355
Compare
Changes have been uploaded to staging. If you need staging access or your account added to the MuckRock organization, let me know.
3 & 4. Organization fields: Plan is included for all organizations if you are a member. For Individuals, it will usually be https://api.muckcloud.com/api/organizations/1/
|
Great, thanks for sharing the example results—very helpful for updating the fixtures. I'm updating the code now to account for these changes, and remove the TODO flags related to them.
I think it's good to keep the door open for the possibility of add-ons that are only for premium users even if they have no per-run cost. Better to set the status explicitly and not infer from a related field.
What would be an example of a non-individual organization with a "Free" plan? |
fde5355
to
8f4faf1
Compare
After reviewing with Mitch, here's a punch list for things to address before opening the PR for real:
|
32bb400
to
3804405
Compare
18a8a18
to
45157eb
Compare
Overview
This update enriches and expands the premium credits UI in two main areas of the application: add-ons and the top navigation.
Please note that this doesn't provide app functionality for handling account upgrades, purchasing credits, etc. This is pure UI and read-only data handing. I've made some assumptions about changes to the API response and backend data mode, which I've tracked with
TODO
comments and detailed below.Top navigation changes
In the process, I created a new dropdown component (
src/common/Dropdown2.svelte
) that improves upon the existing dropdown's state management, styling, and handling of nested dropdowns. Only two other components now use the previous dropdown (src/common/Dropdown.svelte
) and can be upgraded in a focused, follow-up PR.Update add-on components for "Premium Add-Ons"
Screenshots
To Review
Storybooks
npm run storybook
View the stories:
Add-Ons / Browser / Success
for premium sidebar sectionAdd-Ons / Dispatch / Translate Documents
for premium add-on dispatch formAdd-Ons / Dispatch / Premium / ...
for various states of the dispatch form's premium sectionAdd-Ons / Runs / History / Event / Premium Run
for a history list item with an amount of credits spentAccount Navigation / ...
for the new top navigation and individual menu components.Premium Credits / ...
for other components supporting the premium credit experiencePreview Deployment