Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(site): Add Admin Dropdown menu#885

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
presleyp merged 27 commits intomainfromadmin/presleyp/591
Apr 8, 2022
Merged

Conversation

presleyp
Copy link
Contributor

@presleyppresleyp commentedApr 6, 2022
edited
Loading

Fixes#591

  • Adds BorderedMenu, BorderedMenuRow, Typography from v1

  • Adds AdminDropdown, based on v1 ManageDropdown

  • extracts OpenDropdown and CloseDropdown - arrows we can reuse in dropdowns

  • some reorganization of files and storybook

  • stories for BorderedMenu (which includes BorderedMenuRow), Typography, and AdminDropdown

  • test for AdminDropdown - currently just testing links, wrote a ticket to add and test that only admins see it but I don't think we have that capability yet. It's currently guarded by whether you are literallyadmin@coder.com 😂

  • add AuthAndNav to routes

  • remove Settings? Tyler says to keep it

code-asher reacted with eyes emoji
@presleyppresleyp self-assigned thisApr 6, 2022
@codecov
Copy link

codecovbot commentedApr 6, 2022
edited
Loading

Codecov Report

Merging#885 (1dfb981) intomain (4c1ef38) willincrease coverage by0.17%.
The diff coverage is82.07%.

@@            Coverage Diff             @@##             main     #885      +/-   ##==========================================+ Coverage   65.92%   66.10%   +0.17%==========================================  Files         228      238      +10       Lines       14126    14221      +95       Branches      105      115      +10     ==========================================+ Hits         9313     9401      +88  Misses       3868     3868- Partials      945      952       +7
FlagCoverage Δ
unittest-go-macos-latest53.18% <ø> (-0.04%)⬇️
unittest-go-postgres-65.82% <ø> (-0.10%)⬇️
unittest-go-ubuntu-latest55.74% <ø> (+0.22%)⬆️
unittest-go-windows-202252.53% <ø> (-0.06%)⬇️
unittest-js61.56% <82.07%> (+3.31%)⬆️
Impacted FilesCoverage Δ
site/src/AppRouter.tsx0.00% <0.00%> (ø)
site/src/components/BorderedMenu/BorderedMenu.tsx100.00% <ø> (ø)
site/src/components/TabPanel/TabSidebar.tsx0.00% <0.00%> (ø)
site/src/pages/orgs/index.tsx0.00% <0.00%> (ø)
site/src/pages/settings/index.tsx0.00% <0.00%> (ø)
site/src/pages/users.tsx0.00% <0.00%> (ø)
site/src/util/combineClasses.ts100.00% <ø> (ø)
site/src/components/Navbar/NavbarView/index.tsx93.33% <80.00%> (ø)
...src/components/BorderedMenuRow/BorderedMenuRow.tsx88.00% <88.00%> (ø)
site/src/components/Typography/Typography.tsx90.90% <90.90%> (ø)
... and17 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update4c1ef38...1dfb981. Read thecomment docs.

@f0ssel
Copy link
Contributor

So far on the backend we've removed a ton of settings in the "Admin UI" in favor of flags on the coder start command. At this time I can't think of any settings we'll need for MVP, so it seems fine to leave it off for now. I know Github Oauth will land on settings, but I think that's officially "not MVP". I think any work toward the page itself is fine, because we will probably need one eventually, but I wouldn't prioritize the work or link to it yet.

@greyscaled
Copy link
Contributor

Can you merge latest main into this branch so that we get the Chromatic workflow to run

@presleyppresleyp marked this pull request as ready for reviewApril 7, 2022 22:56
@presleyppresleyp requested a review froma team as acode ownerApril 7, 2022 22:56
Copy link
Member

@code-ashercode-asher left a comment

Choose a reason for hiding this comment

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

Love seeing all the tests and stories!

@@ -0,0 +1,26 @@
import { fade, makeStyles, Theme } from "@material-ui/core/styles"
Copy link
Member

Choose a reason for hiding this comment

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

I like how much more reusable these arrows are now.

greyscaled reacted with thumbs up emoji
path={entry.path}
title={entry.label}
variant="narrow"
onClick={() => {
Copy link
Member

Choose a reason for hiding this comment

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

This is not something we need to address here but just a thought I had. I think all of the dropdown items as they exist in v1 could easily beNavLinks so I wonder if we should remove the ability to pass in anonClick and makepath required. Maybe that would promote making sure nav items really are regular anchor-based nav items, too (in v1 trying to open "add organization" in a new tab by middle-mouse clicking for example does nothing because it utilizesonClick for page navigation instead of being a standard<a>).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Sounds like a good idea, can you make a chore ticket for it?

Copy link
Member

Choose a reason for hiding this comment

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

Will do. 🧹

@code-asher
Copy link
Member

code-asher commentedApr 8, 2022
edited
Loading

remove Settings?

If reaching a decision takes a bit maybe we merge with it in and remove later if necessary (or the other way around works too I suppose).

@presleyppresleyp merged commit3f21ea4 intomainApr 8, 2022
@presleyppresleyp deleted the admin/presleyp/591 branchApril 8, 2022 22:25
@missknissmisskniss added this to theV2 Beta milestoneMay 15, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@code-ashercode-ashercode-asher approved these changes

@greyscaledgreyscaledgreyscaled approved these changes

Assignees

@presleyppresleyp

Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

Nav Bar - Create a view for Admins to see all the users and orgs in their site
5 participants
@presleyp@f0ssel@greyscaled@code-asher@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp