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

feat: #153 v5 top bar update docs #240

Merged
merged 8 commits into from
Dec 13, 2024
Merged

Conversation

nurm717123
Copy link
Contributor

@nurm717123 nurm717123 commented Dec 6, 2024

In line with our previous team discussions about standardizing the MDX documentation and avoiding the embedding of Figma guideline SVGs, this pull request addresses that issue. Additionally, this pr also contain small fix regarding the default top-bar menu popover y offset, I think there was a potential misunderstanding regarding the default Y offset of the menu, specifically:

previous reference

image

which should be this (notice there is wider gap between nav and menu)

image

thankfully to make that gap size we can utilize spacing-10 to have the same space 👍 .

Pull request checklist

  • update docs
  • update default menu popover y offset

Detail as per issue below (required):

fixes:

fixed result:

  • menu gap size

    • figma
      image
    • this pr
      image
  • docs

2024-12-06.13-53-30.mov

@github-actions github-actions bot closed this Dec 6, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Closing this pull request since the title does not match ^(?:(?:[WIP] ?)?(?:build|ci|chore|docs|task|feat|fix|perf|refactor|revert|style|test):(?:\ +?#\d+?\ +?)?.)|(?:[Snyk].) pattern. Please fix the title and re-open the pull request.

@nurm717123 nurm717123 changed the title 153 v5 top bar update docs feat: #153 v5 top bar update docs Dec 6, 2024
@nurm717123 nurm717123 reopened this Dec 6, 2024
Copy link

codacy-production bot commented Dec 6, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 76eb8dc1 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (76eb8dc) Report Missing Report Missing Report Missing
Head commit (b0fb9bf) 4446 3991 89.77%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#240) 2 2 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@nurm717123
Copy link
Contributor Author

I have re-updated the top bar docs to include stories for each viewport variant, as suggested by the design team, there is 2 option to go through each viewport variant:

  1. using available screen selector at toolbar
  2. use stories in sidebar

I keep both version, so let me know if we can't keep both

@@ -34,7 +34,7 @@ export const ElTopBar = styled.div`
border-bottom: var(--border-default, 1px) solid var(--outline-default, #e5e9ed);
background: var(--fill-white, #fff);

${isDesktopOrBelow} {
${isBelowWideScreen} {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I initially overlooked this because there are no < or > indicators in the design. However, I now believe this is correct since the only viewport with an indicator is mobile (<768px). This implies that tablet starting at 768px should mean 768px++, and similarly, desktop should be 1024px++, and so on.

@@ -46,7 +46,7 @@ export const ElTopBar = styled.div`
}
}

${isTabletOrBelow} {
${isBelowDesktop} {
Copy link
Contributor Author

@nurm717123 nurm717123 Dec 12, 2024

Choose a reason for hiding this comment

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

same as above

I initially overlooked this because there are no < or > indicators in the design. However, I now believe this is correct since the only viewport with an indicator is mobile (<768px). This implies that tablet starting at 768px should mean 768px++, and similarly, desktop should be 1024px++, and so on.

import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
console.log(INITIAL_VIEWPORTS)

const viewports: typeof INITIAL_VIEWPORTS = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to add additionals because storybook's provided viewport doesn't have widescreen .etc

},
},
}
export const ReactUsage: StoryObj<typeof TopBar> = {

export const ResponsiveMainNav: Story = {
Copy link
Contributor Author

@nurm717123 nurm717123 Dec 12, 2024

Choose a reason for hiding this comment

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

all stories already responsive since it use React component now, this one is different because containing CSSQueryContainer which doesn't show in the other one

@@ -11,7 +11,7 @@ export const GuidelinesImage: FC<GuidelinesImageProps> = ({ name }) => (

export const figmaDesignUrls = {
appBar:
'https://www.figma.com/design/6CaivqdlTX0UkFYJkpBKDu/Reapit-DS?node-id=428-7209&node-type=frame&t=RHaBJeesRCccFe53-0',
'https://www.figma.com/design/XJ6qcAV8gHscsUodqJMNEF/Reapit-Elements-production-ready-components?node-id=16-4840&m=dev',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TopBar related component now use this docs as main source

@nurm717123 nurm717123 merged commit 9066a35 into main Dec 13, 2024
6 checks passed
@nurm717123 nurm717123 deleted the 135-v5-top-bar-update-docs branch December 13, 2024 02:24
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.

2 participants