-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Meshery] Fix sidebar navigation to respective sections #8026
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
Open
MAYANKSHARMA01010
wants to merge
6
commits into
layer5io:master
Choose a base branch
from
MAYANKSHARMA01010:fix/issue-8007-sidebar-navigation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
34e5e47
feat: implement smooth scroll navigation and id fallback for steps list
MAYANKSHARMA01010 278ee59
style: add scroll-margin-top to step wrappers
MAYANKSHARMA01010 bcb555f
style: support sticky positioning for nav indicator wrapper
MAYANKSHARMA01010 56940d1
fix: support deep-linking, browser history navigation, and heading focus
MAYANKSHARMA01010 5bd806f
fix: resolve Y-axis overflow on backward step navigation and address …
MAYANKSHARMA01010 6ab351f
fix: remove visual outline on programmatic step heading focus
MAYANKSHARMA01010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 46 additions & 10 deletions
56
src/components/Animated-steps-list/Steps-indicator/StepsIndicator.style.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,57 @@ | ||
| import styled from "styled-components"; | ||
|
|
||
| export const StepsIndicatorWrapper = styled.ul` | ||
| export const StepsIndicatorWrapper = styled.nav` | ||
| padding: 0; | ||
| margin: 0; | ||
|
|
||
| & .indicator-list { | ||
| padding: 0; | ||
| margin: 0; | ||
| list-style: none; | ||
| } | ||
|
|
||
| & li { | ||
| margin-bottom: 1rem; | ||
|
|
||
| & li { | ||
| font-size: 17px; | ||
| line-height: 28px; | ||
| color: gray; | ||
| margin-bottom: 16px; | ||
| & .indicator-link { | ||
| display: inline-block; | ||
| text-decoration: none; | ||
| background: transparent; | ||
| border: none; | ||
| box-shadow: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| font-family: inherit; | ||
| font-size: 17px; | ||
| line-height: 28px; | ||
| color: ${(props) => props.theme.greyB4B4B4ToGrey505050 || "gray"}; | ||
| cursor: pointer; | ||
| transition: | ||
| color 0.2s ease, | ||
| font-weight 0.2s ease; | ||
|
|
||
| &.active { | ||
| font-weight: 600; | ||
| color: ${props => props.theme.text}; | ||
| &:hover { | ||
| color: ${(props) => props.theme.secondaryColor || "#00b39f"}; | ||
| background: transparent; | ||
| box-shadow: none; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| &:focus { | ||
| outline: none; | ||
| box-shadow: none; | ||
| } | ||
|
|
||
| &:focus-visible { | ||
| outline: 2px solid ${(props) => props.theme.secondaryColor || "#00b39f"}; | ||
| outline-offset: 3px; | ||
| border-radius: 4px; | ||
| } | ||
| } | ||
|
|
||
| } | ||
| &.active .indicator-link { | ||
| font-weight: 600; | ||
| color: ${(props) => props.theme.text}; | ||
| } | ||
| } | ||
| `; |
50 changes: 40 additions & 10 deletions
50
src/components/Animated-steps-list/Steps-indicator/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 30 additions & 19 deletions
49
src/components/Animated-steps-list/Steps-list/Step/Step.style.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,38 @@ | ||
| import styled from "styled-components"; | ||
|
|
||
| export const StepWrapper = styled.li` | ||
| width: 314px; | ||
|
|
||
| width: 314px; | ||
| scroll-margin-top: 9.5rem; | ||
|
|
||
| @media (max-width: 850px) { | ||
| width: unset; | ||
| scroll-margin-top: 6rem; | ||
| } | ||
|
|
||
| & h3 { | ||
| margin-bottom: 12px; | ||
| margin-top: 0; | ||
| scroll-margin-top: 9.5rem; | ||
|
|
||
| @media (max-width: 850px) { | ||
| width: unset; | ||
| scroll-margin-top: 6rem; | ||
| } | ||
|
|
||
| & h3 { | ||
| margin-bottom: 12px; | ||
| margin-top: 0; | ||
| } | ||
| &:focus { | ||
| outline: none; | ||
| } | ||
| } | ||
|
|
||
| & .description { | ||
| & > p { | ||
| font-size: 17px; | ||
| line-height: 28px; | ||
| letter-spacing: 0.0125em; | ||
| color: var(--gray-2); | ||
| } | ||
| } | ||
|
|
||
| & .description { | ||
| & > p { | ||
| font-size: 17px; | ||
| line-height: 28px; | ||
| letter-spacing: 0.0125em; | ||
| color: var(--gray-2); | ||
| } | ||
| } | ||
|
|
||
| & > .logo-list { | ||
| margin-top: 38px; | ||
| } | ||
| & > .logo-list { | ||
| margin-top: 38px; | ||
| } | ||
| `; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.