-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Docs redesign adjustments #28203
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a8c1a40
improve sidebar
mnajdova f6e897f
change settings drawer mode icons
danilo-leal b614496
add PlusJakatarSans bold
siriwatknp 70a58a9
run prettier
siriwatknp 3df0a43
fix DrawerSettings background
siriwatknp b9f1caa
update drawer settings Pascal case
siriwatknp 1148eb1
remove unused component
siriwatknp cf8922c
remove absolute from edit page
siriwatknp 3e0b423
fix drawer item styles
siriwatknp d19b2f8
fix ads styles and remove jss
siriwatknp 4bfd7f5
reduce h2 code fontsize
siriwatknp d3d3d79
use pixel to rem utility
danilo-leal db814cd
minor adjustment on the nav drawer items order
danilo-leal 56d9fae
small color tweak
danilo-leal e1f03a2
use px to rem utility
danilo-leal 20589fa
more use of px to rem utility
danilo-leal 39e4ab2
prettier
danilo-leal 613df27
add icons to nav drawer
siriwatknp c009960
h2 code iteration
danilo-leal f8126da
yarn docs:i18n
siriwatknp afbbfad
minor styling on drawer item
siriwatknp 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 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
Binary file not shown.
This file contains 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 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 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 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 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.
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.
@mnajdova we might need to investigate more on this, it is very buggy and hard to reason. by using styled component and pass to
<Drawer PaperProps={{ component: DrawerPaper, square: true, elevation: 0 }}
, it is stillrounded
.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.
also classname got double.
elevation-1 elevation-0
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.
Will take a look thanks for pointing it out. I think that the general problem is that the portaled components don't support the
components
&componentsProps
which would replace the components underneath instead of aliasing it to theas
property (which is what we currently do).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.
Currently what you have is:
<StyledPaper as={AnotherStyledPaper} />
- which results in double classes and non-deterministic classes order in the head.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 would probably just set the
sx
prop :)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.
Ok, we need to have some story around this in the migration guide I think. I agree it is hard to reason about.
In v4 when you provide a
component
it was changing the element that is rendered, but it also was adding theclasses
for that element, so the styles were applied.In v5, to make it work identical, we are mapping the
component
prop to theas
prop, so that the styles defined originally in the component would still be applied. This however does not guarantees that the styles for the component defined via theas
property would win.I think that we should specify in the migration guide, that for cases like this, when
SomeComponentProps
is used, we recommendsx
for overriding the styles. When we add thecomponents
&componentsProps
API on all components, that would add a possibility for completely replacing that slot with a new component. Note that the new component can actually be a styled version of the original component, and in that case we would be able to actually override the styles for it.Does this summary makes sense?
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.
Here is a sandbox illustrating the current behavior https://codesandbox.io/s/magical-mahavira-6p39p?file=/src/App.js