Skip to content

Add feature flag for blocked repositories UI #11304

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

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Jul 12, 2022

Description

Add a feature-flagged entry in the admin sidebar that will show a placeholder blocked repositories admin UI.

The feature flag is enabled for non-production environments (ie preview and staging).

Related Issue(s)

Part of #11030

How to test

Start the preview environment and see the new Repositories menu item in the Admin menu:

image

The link takes you to an empty placeholder page:

image

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@andrew-farries andrew-farries requested a review from a team July 12, 2022 07:17
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jul 12, 2022
@geropl geropl self-assigned this Jul 12, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-feature-flag-for-blocked-repos-ui.11 because the annotations in the pull request description changed
(with .werft/ from main)

@geropl
Copy link
Member

geropl commented Jul 12, 2022

@andrew-farries When loading /workspace I see a blank page in 50% of the cases, or errors like this:

![image](https://user-images.githubusercontent.com/32448529/178435439-698f7af8-3ff3-440b-8b70-96274bff1eed.png)

Other errors cite FeatureFlagContext and AdminSubMenu. The state of the page changes multiple times automatically, without any interaction (probably because changes in Contexts propagate hierarchically...?)

Also, I noticed isblockedrepositoriesuienabled is queried two times per load.

☁️ As much as I love the "feature flag in context" approach: One way to move forward with this would be to do the feature flag it "as usual", and play around with the other approach separately. 💯

@andrew-farries
Copy link
Contributor Author

@andrew-farries When loading /workspace I see a blank page in 50% of the cases, or errors like this:

The errors you were seeing were due to me using a telepresence pod at the same time that Werft deployed another dashboard pod to the preview environment. I had the same problem. I've stopped messing with telepresence so it should be good now.

@geropl
Copy link
Member

geropl commented Jul 12, 2022

image
nit: I feel this should be named "Blocked Repositories": That way it's not confused with other entities (User, Workspace, Repository).

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested and works.

/hold because of names, names, names... #11304 (comment) 🙃

@andrew-farries
Copy link
Contributor Author

Renamed and tagged in @gtsiolis because I made the submenu wider to accommodate the longer text.

@gtsiolis this width change 31b599f applies to all submenus, not just the admin one.

Looking at the other areas where a submenu is used it seems fine. We could alternatively pass the width as a prop to PageWithSubmenu.

@gtsiolis
Copy link
Contributor

gtsiolis commented Jul 12, 2022

Looking at this now! 👀

Thanks for the ping, @andrew-farries! 🏓

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Thanks again for the ping, @andrew-farries! 🏓
Left one non-blocking comment regarding menu order. ❗

🍊 🍊 🍊 🍊

The subtle 16px change in the width of the sidebar sounds ok from UX perspective to leave as is for all sidebar instances, no need to introduce a prop for conditionally change the width. ✔️

This would also look ok even after replacing the sidebar menu with tabs for the admin dashboard #7879. ✔️

Long-term we can work of fine tuning breakpoints and column layout, see relevant discussion (internal) and some early designs around this in #8133 (comment). 🗺️

🍋 🍋 🍋 🍋

One aspect that is not clear but probably irrelevant and out of the scope of this PR at the moment is whether we'd like to also list repositories, introduce a repository view, and have an action to block from there. This could be relevant when we introduce better control for multi-repository support, etc.

🥝 🥝 🥝 🥝

Regarding the menu label, I agree with @geropl in #11304 (comment) on being more explicit here although the dashboard design so far has been using shorter verbs or labels when possible to be clearer to users but also follow our design principles (internal). 🥯

@andrew-farries andrew-farries force-pushed the af/feature-flag-for-blocked-repos-ui branch from 31b599f to 405aaae Compare July 12, 2022 11:22
@andrew-farries
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit fbdaff0 into main Jul 12, 2022
@roboquat roboquat deleted the af/feature-flag-for-blocked-repos-ui branch July 12, 2022 11:33
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants