-
Notifications
You must be signed in to change notification settings - Fork 323
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
Fix cut-off in text visualisations #6421
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7bd447c
Remove double padding
Procrat 792ed93
Fix scrolling issue
Procrat 9bdfc9e
Fix line height for text grid entries
Procrat e087e9c
Changelog
Procrat 0b6fd09
Add comment
Procrat 9452501
Merge branch 'develop' into wip/procrat/json-viz-last-row-6196
Procrat b63966e
Merge branch 'develop' into wip/procrat/json-viz-last-row-6196
Procrat 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
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.
What is this? Looks magical. If we need it, it should have doc comment with explanation.
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 explained in the PR description, but I'll copy-paste it into a comment.
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.
Hmm, if you are referring to this explanation:
Then I do not understand it. I was reading it several times and it's not clear to me. default of 1.2 is great for multi-line text readability, like in our case. We should not change it to 1.0.
Anyway, you've written "In this case, however, where the height and the font size are set to the same value, the default setting of 1.2 pushes the text below the allotted space":
Can we make it working with default line-height?
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.
The height of the element this part of the code is defining: the grid view entry.
The vertical space that is available for the text in this element which is fixed by the height which is explicitly set in the line above.
Because with a font size of 12px and a line height of 1.2, there's not a enough room in an element that's only 12px high. It needs something like
1.2 * 12px ~= 14px
.Another option might be to make the entry size higher: not set it to any value and let the browser derive it from the font size and line height. Looking at the code, however, it looks like we always let the entry size be set externally, by the component that uses the text grid. That might be substantial change because the grid view is used in a bunch of places. Any other ideas?
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.
Wait, can't we just change this line:
https://github.com/enso-org/enso/blob/develop/lib/rust/ensogl/app/theme/hardcoded/src/lib.rs#L590 ?
It sets the height of the grid entry as far as I can see.
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.
@wdanilo: To make sure there's no confusion here, this PR doesn't change the distance between lines of text. The grid view entries are still fixed to the same height. This just changes where the text appears in relation to the grid view entry div.