-
Notifications
You must be signed in to change notification settings - Fork 344
fix(docgen-sidebar): modernized blueprint dropdown (DOCGEN-7872) #4392
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,10 @@ | |
| overflow: 'auto' 'auto'; | ||
| } | ||
|
|
||
| .bcs-DocGen-tagPath { | ||
| padding-left: var(--space-1); | ||
| } | ||
|
|
||
| .bcs-DocGen-accordion * { | ||
| width: auto; | ||
| padding: 0; | ||
|
|
@@ -47,9 +51,13 @@ | |
| } | ||
|
|
||
| .bcs-DocGen-collapsible { | ||
| padding-top: var(--space-3); | ||
| padding-right: var(--space-6); | ||
| min-width: 0; | ||
| border: none; | ||
| width: 100%; | ||
pyaromchyk-stack marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| * { | ||
| text-transform: unset; | ||
| } | ||
|
Comment on lines
+58
to
+60
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which element(s) are we trying to target? we should avoid using a wildcard like this unless necessary
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it I see, your change makes sense then. but I also think that we'll need to fix Blueprint eventually because this seems like a weird behavior and has internalization issues
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pyaromchyk-stack could you open an issue for blueprint and let them know there's a concern with setting |
||
| } | ||
|
|
||
| .bcs-DocGenSidebar-loading { | ||
|
|
||
pyaromchyk-stack marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import noop from 'lodash/noop'; | ||
| import { http, HttpResponse } from 'msw'; | ||
| import type { HttpHandler } from 'msw'; | ||
| import type { Meta } from '@storybook/react'; | ||
| import ContentSidebar from '../../ContentSidebar'; | ||
| import { mockFileRequest } from '../../stories/__mocks__/ContentSidebarMocks'; | ||
| import mockDocGenTags from '../../__mocks__/DocGenSidebar.mock'; | ||
|
|
||
| const defaultArgs = { | ||
| detailsSidebarProps: { | ||
| hasProperties: true, | ||
| hasNotices: true, | ||
| hasAccessStats: true, | ||
| hasClassification: true, | ||
| hasRetentionPolicy: true, | ||
| }, | ||
| features: global.FEATURE_FLAGS, | ||
| fileId: global.FILE_ID, | ||
| hasActivityFeed: true, | ||
| hasMetadata: true, | ||
| hasSkills: true, | ||
| hasVersions: true, | ||
| token: global.TOKEN, | ||
| }; | ||
|
|
||
| const docGenSidebarProps = { | ||
| enabled: true, | ||
| isDocGenTemplate: true, | ||
| checkDocGenTemplate: noop, | ||
| getDocGenTags: async () => ({ | ||
| pagination: {}, | ||
| data: mockDocGenTags, | ||
| }), | ||
| }; | ||
|
|
||
| export const basic = { | ||
| args: { | ||
| defaultView: 'docgen', | ||
| docGenSidebarProps, | ||
| }, | ||
| }; | ||
|
|
||
| export const withModernizedBlueprint = { | ||
| args: { | ||
| enableModernizedComponents: true, | ||
| defaultView: 'docgen', | ||
| docGenSidebarProps, | ||
| }, | ||
| }; | ||
|
|
||
| const meta: Meta<typeof ContentSidebar> & { parameters: { msw: { handlers: HttpHandler[] } } } = { | ||
| title: 'Elements/ContentSidebar/DocGenSidebar', | ||
| component: ContentSidebar, | ||
| args: defaultArgs, | ||
| parameters: { | ||
| msw: { | ||
| handlers: [ | ||
| http.get(mockFileRequest.url, () => { | ||
| return HttpResponse.json(mockFileRequest.response); | ||
| }), | ||
| ], | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| export default meta; |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see quite of few blueprint overrides in this file. in general, we should avoid overriding blueprint because it can potentially lead to issues such as what caused this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let blueprint team know about case issue
Since I am not authorized to merge tin this project, would you mind helping me with that?