-
Notifications
You must be signed in to change notification settings - Fork 4.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
Polish permalink UI and make it responsive #9010
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
481026c
Fix input and focus style for permalink slug
63a23a7
Fix regression with horizontal scrollbar on mobile.
d069ac5
Use serious flexing to scale the permalink editor.
bab5c54
chore: Fix typo
tofumatt ab3c628
chore: Wording tweak
tofumatt f5c3696
Clarify comments.
f0e3b9d
Address feedback.
4c35997
chore: Fix failing CSS Lint test
tofumatt 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,29 @@ | |
display: inline-flex; | ||
align-items: center; | ||
|
||
.editor-post-permalink-editor__container { | ||
flex: 0 1 100%; | ||
display: flex; | ||
overflow: hidden; // This enables serious flex shrinking. | ||
padding: $border-width 0; // Necessary for the overflow to not crop the focus style. | ||
|
||
.editor-post-permalink-editor__prefix { | ||
flex: 1 1 auto; | ||
|
||
@include break-small { | ||
flex: 1 0 auto; | ||
} | ||
} | ||
|
||
.editor-post-permalink-editor__edit { | ||
flex: 1 1 100%; | ||
} | ||
} | ||
|
||
// Higher specificity required to override core margin styles. | ||
.editor-post-permalink-editor__save { | ||
margin-left: auto; | ||
flex: 0 1 auto; | ||
} | ||
} | ||
|
||
|
@@ -70,12 +90,17 @@ | |
text-overflow: ellipsis; | ||
} | ||
|
||
.editor-post-permalink-editor__edit { | ||
min-width: 20%; | ||
margin: 0 5px; | ||
.editor-post-permalink input[type="text"].editor-post-permalink-editor__edit { | ||
// Input fields are created with inherent widths. | ||
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. This was the cause of the failing test; fixing it now. |
||
// By supplying both a (any) width and a min-width, we allow it to scale in a flex container. | ||
min-width: 10%; | ||
width: 100%; | ||
margin: 0 3px; | ||
padding: 2px 4px; | ||
} | ||
|
||
.editor-post-permalink-editor__suffix { | ||
color: $dark-gray-300; | ||
margin-right: 10px; | ||
margin-right: 6px; | ||
flex: 0 0 0%; | ||
} |
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.
It's close, but this is not quite following the naming standards. Specifically, the part preceding the
__
isn't concerned at all with the file name, only the top-level folder and the immediate parent folder. It should beeditor-post-permalink__editor-container
.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.
Looking again at those standards, we need to update them to be less... editor-specific.
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.
Addressed feedback for now, perhaps we can revisit the editor naming separately?