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

App + Subscription Metadata Editing, and User creation on login #105

Merged
merged 9 commits into from
Sep 27, 2024

Conversation

Charlesthebird
Copy link
Collaborator

@Charlesthebird Charlesthebird commented Sep 25, 2024

This PR includes:

  • An improvement to the login UX with the request for initial user creation happening from the UI.
  • Sections for editing app and subscription metadata.

This video shows the new login flow. I log in as the admin_user. This user does not have a record in the portal server DB, so the website sends a request to create the user and mutates the SWR key for /me. The user info is then displayed correctly on the website.

Screen.Recording.2024-09-25.at.4.27.32.PM.mov

This is a video of editing the rate limit and custom metadata as an admin user:

Screen.Recording.2024-09-27.at.2.41.02.PM.mov

Non admin users see this apps page and app details page view of the metadata.
Screenshot 2024-09-27 at 2 43 32 PM

Screenshot 2024-09-27 at 2 43 45 PM

There is a portal server bug with the subscriptions not returning the metadata, so when that is completed the metadata editor should work on the subscriptions as well, since it uses the same logic.

Screenshot 2024-09-27 at 3 00 57 PM BOT NOTES: resolves https://github.com/solo-io/solo-projects/issues/6952 resolves https://github.com/solo-io/solo-projects/issues/6958

Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
@solo-changelog-bot
Copy link

Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
… for admins + non-admins.

Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
@Charlesthebird Charlesthebird marked this pull request as ready for review September 27, 2024 19:10
@Charlesthebird Charlesthebird changed the title changelog App + Subscription Metadata Editing, and User creation on login Sep 27, 2024
projects/ui/src/Apis/gg_hooks.ts Show resolved Hide resolved
if (shallowEquals(newRateLimitInfo, initialRateLimitInfo)) {
return;
}
(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit that this section has a LOT of repeat that could be done as like toastObject(verb: string, metadataType:string) or whatever

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - I can do that refactor in a follow up.

@@ -167,3 +167,19 @@ export const useInArea = (paths: string[]) => {
});
}, [routerLocation.pathname, paths]);
};

export const shallowEquals = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not out of the box in JS yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still isn't. Sigh

Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
@@ -167,3 +167,19 @@ export const useInArea = (paths: string[]) => {
});
}, [routerLocation.pathname, paths]);
};

export const shallowEquals = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still isn't. Sigh

projects/ui/src/Utility/utility.ts Outdated Show resolved Hide resolved
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
@Charlesthebird Charlesthebird merged commit 9efb094 into gg-portal-1.18-features Sep 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants