-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
UI: Simplify custom Sidebar styling by adding classNames to DOM elements #13155
Conversation
<SearchField {...getRootProps({ refKey: '' }, { suppressRefError: true })}> | ||
<SearchField | ||
{...getRootProps({ refKey: '' }, { suppressRefError: true })} | ||
className="search-field" |
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.
Previously accessed using nav.container.sidebar-container form
@@ -124,7 +124,7 @@ const Result: FunctionComponent< | |||
const nameMatch = matches.find((match: Match) => match.key === 'name'); | |||
const pathMatches = matches.filter((match: Match) => match.key === 'path'); | |||
const label = ( | |||
<div> | |||
<div className="search-result-item--label"> |
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.
invented
@@ -202,7 +202,7 @@ export const SearchResults: FunctionComponent<{ | |||
<ResultsList {...getMenuProps()}> | |||
{results.length > 0 && !query && ( | |||
<li> | |||
<RootNode>Recently opened</RootNode> | |||
<RootNode className="search-result-recentlyOpened">Recently opened</RootNode> |
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.
All invented in this (didn't exists before)
@@ -77,6 +77,7 @@ const Node = React.memo<NodeProps>( | |||
<LeafNode | |||
key={id} | |||
id={id} | |||
className="sidebar-item" |
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.
already present in 6.0
<RootNode | ||
key={id} | ||
id={id} | ||
className="sidebar-subheading" |
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.
already present in 6.0
{item.name} | ||
<Action | ||
type="button" | ||
className="sidebar-subheading-action" |
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.
invented
@@ -119,6 +128,7 @@ const Node = React.memo<NodeProps>( | |||
<BranchNode | |||
key={id} | |||
id={id} | |||
className="sidebar-item" |
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.
already present in 6.0 (they where all sidebar-item before)
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.
LGTM!
Issue:
It became difficult to add style to the sidebar
What I did
add classnames back
How to test