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: add top-level nav styles#883

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
code-asher merged 3 commits intomainfromasher/top-nav
Apr 6, 2022
Merged

feat: add top-level nav styles#883

code-asher merged 3 commits intomainfromasher/top-nav
Apr 6, 2022

Conversation

code-asher
Copy link
Member

@code-ashercode-asher commentedApr 6, 2022
edited
Loading

Partially addresses#701.

Pretty much just adds the styling for top-level nav items. For now it contains one link (projects, soon to be templates).

I avoided the nested navbar entry component since it looked fairly clean to use ListItem and NavLink at the top to me. NavLink also handles the active link (looks like we were doing that manually before) and I left out the resize handlers.

If we port over the route config or something similar we can add a loop where the projects/template link is.

Originally I had the organizations dropdown in there too but I stashed that for now since I saw there was some overlap in Presley's tickets so I thought I might be stepping on toes with the bordered menu (the row, label, etc, I wanted to flatten things a bit as well), plus it will be easier to implement that dropdown once we actually have some organization stuff to link it to anyway (but let me know if it would be better for me to port that over; I am perfectly happy to do so).

The projects/templates link does feel a little redundant since the logo goes to the same place but I suppose it does have the advantage of explicitly being called "projects" so it is more discoverable.

As an aside, does anyone know why<ListItem button> is adiv instead ofli? Seems like a bug with MUI potentially. Ideally I would not usebutton at all but idk how else to get the ripple effect on click. Ideally it would be supported onNavLink.

@code-ashercode-asher requested a review froma team as acode ownerApril 6, 2022 01:07
@code-ashercode-asher changed the titleAdd projects link to the top navfeat: add projects link to the top navApr 6, 2022
@codecov
Copy link

codecovbot commentedApr 6, 2022
edited
Loading

Codecov Report

Merging#883 (5ba5339) intomain (8813788) willdecrease coverage by0.27%.
The diff coverage is100.00%.

@@            Coverage Diff             @@##             main     #883      +/-   ##==========================================- Coverage   65.80%   65.53%   -0.28%==========================================  Files         123      216      +93       Lines       12570    13734    +1164       Branches        0      103     +103     ==========================================+ Hits         8272     9000     +728- Misses       3406     3810     +404- Partials      892      924      +32
FlagCoverage Δ
unittest-go-65.29% <ø> (-0.03%)⬇️
unittest-go-macos-latest52.67% <ø> (+0.11%)⬆️
unittest-go-ubuntu-latest55.26% <ø> (+0.06%)⬆️
unittest-go-windows-202252.14% <ø> (?)
unittest-js58.87% <100.00%> (?)
Impacted FilesCoverage Δ
site/src/components/Navbar/NavbarView.tsx100.00% <100.00%> (ø)
provisionerd/provisionerd.go77.67% <0.00%> (-2.50%)⬇️
peerbroker/proxy.go57.55% <0.00%> (-0.59%)⬇️
site/src/components/Form/FormTitle.tsx100.00% <0.00%> (ø)
site/src/components/EmptyState/index.tsx85.71% <0.00%> (ø)
site/src/theme/overrides.ts100.00% <0.00%> (ø)
site/src/components/Button/index.ts100.00% <0.00%> (ø)
site/src/components/Button/SplitButton.tsx89.47% <0.00%> (ø)
site/src/xServices/StateContext.tsx100.00% <0.00%> (ø)
pty/start_windows.go66.95% <0.00%> (ø)
... and92 more

Continue to review full report at Codecov.

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

Copy link
Contributor

@greyscaledgreyscaled left a comment

Choose a reason for hiding this comment

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

@code-asher - might want to update PR title/desc, ticket and impl to match#880 ---> seems it came in recently from external feedback right after this was posted, sorry that it will require adjustments here!

<div className={styles.fullWidth} />
<div className={styles.fixed}>{user && <UserDropdown user={user} onSignOut={onSignOut} />}</div>
</div>
</nav>
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: for fixing the semantics of this HTML

code-asher reacted with heart emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

yay!

@code-asher
Copy link
MemberAuthor

Oh oops thanks for the heads up!

@code-ashercode-asher changed the titlefeat: add projects link to the top navfeat: add top-level nav stylesApr 6, 2022
},

// NavLink adds this class when the current route matches.
"&.active": {
Copy link
Contributor

Choose a reason for hiding this comment

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

chef's kiss

@code-ashercode-asher merged commitfe23dcd intomainApr 6, 2022
@code-ashercode-asher deleted the asher/top-nav branchApril 6, 2022 18:12
@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

@greyscaledgreyscaledgreyscaled left review comments

@presleyppresleyppresleyp approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

4 participants
@code-asher@presleyp@greyscaled@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp