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

Demo datasource project global banner #1494

Conversation

tinahollygb
Copy link
Contributor

@tinahollygb tinahollygb commented Jul 20, 2023

Features and Changes

This banner will warn users when they're in the demo datasource project so that they don't accidentally create resources under it.

Clicking on the text will show a tooltip. Clicking on the text again or anywhere else on the screen will hide the tooltip.

It's gated behind a feature flag and will not be shown in demo datasource projects on prod without the feature being enabled.

Dependencies

n/a

Testing

  1. Create a project with the demo ID. You can create any project and change the ID to the demo ID. See Add utils to support demo datasource project #1477 for the function you can run locally to get the demo ID for your organization.
  2. Load any page with the demo project selected
  3. See the banner

Screenshots

When the project is the demo datasource project:

image image

And on longer pages (org settings) it's sticky.

image

No project or a different project:

image

@linear
Copy link

linear bot commented Jul 20, 2023

GB-293 Demo Datasource -> UI: Global banner to warn users about working in the demo datasource project

Add global UI to alert users they're in the demo project, which has limited capabilities and will have the resources deleted on cleanup.

We can also add that if they accidentally deleted something, they can delete the project and recreate it to get it back.

@tinahollygb tinahollygb requested a review from a team July 20, 2023 22:43
@github-actions
Copy link

github-actions bot commented Jul 20, 2023

Your preview environment pr-1494-bttf has been deployed.

Preview environment endpoints are available at:

@tinahollygb
Copy link
Contributor Author

@jdorn as requested I've added a badge/pill to highlight the demo project in the projects dropdown.

image image image

@tinahollygb
Copy link
Contributor Author

Also made the copy changes requested fd249c5
image

})
? badgeProps
: null
}
Copy link
Member

Choose a reason for hiding this comment

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

You shouldn't need a isDemoDatasourceProject check here. badgeProps is null if it's not a demo project, so you can just always pass that in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check is in the map, we need to check if p.id is the demo project so that it shows in the projects available to select, not if the current project that's selected is.

What we want (current code):

image

What we'd get with your suggestion:

image

@tinahollygb tinahollygb merged commit 32a11d8 into main Jul 24, 2023
3 checks passed
@tinahollygb tinahollygb deleted the tina/gb-293-demo-datasource-ui-global-banner-to-warn-users-about-working branch July 24, 2023 21:51
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.

None yet

2 participants