Skip to content
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

Improve label and text wrapping #14113

Merged
merged 7 commits into from
Dec 29, 2020
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Dec 22, 2020

  • Adjust issue list styles so labels can wrap on the same line as the text. This relies on display: inline with the HTML whitespace being used as the separator.
  • Add global word-break: break-word. This should generally avoid text overflows in various places.

Screen Shot 2020-12-22 at 16 57 22

Screen Shot 2020-12-22 at 16 57 30

Screen Shot 2020-12-22 at 16 57 41

Screen Shot 2020-12-22 at 18 47 26

- Adjust issue list styles so labels can wrap on the same line as the
  text. This relies on `display: inline` with the HTML whitespace being
  used as the separator.
- Add global word-break: break-word. This should generally avoid text
  overflows in various places.
@silverwind silverwind added topic/ui Change the appearance of the Gitea UI skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Dec 22, 2020
@silverwind
Copy link
Member Author

Test failure is unrelated.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 22, 2020
@noerw
Copy link
Member

noerw commented Dec 22, 2020

Nice! But issue comment labels have no spacing anymore
grafik

@silverwind
Copy link
Member Author

Fixed that by adding a space after each label.

@noerw
Copy link
Member

noerw commented Dec 22, 2020

Not sure it's good having break-word on body. On small screens layout seems worse:

grafik grafik

@silverwind
Copy link
Member Author

silverwind commented Dec 22, 2020

I think it's an overall improvement and we can deal with such cases individually. We have many places where text can overflow currently:

without break-work:
Screen Shot 2020-12-22 at 19 02 17

with break-word:
Screen Shot 2020-12-22 at 19 02 38

break-all would be even nicer because it will not break the first line on long strings without whitespace but it has the downside of breaking apart words.

@silverwind
Copy link
Member Author

Pushed a change that switches global rule to overflow-wrap which should fix the two cases @noerw posted while still keeping certain overflows from going offscreen.

@silverwind silverwind changed the title Improve label wrapping Improve label and text wrapping Dec 22, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 28, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 29, 2020
@techknowlogick
Copy link
Member

🚀

@techknowlogick techknowlogick merged commit 8e5aea8 into go-gitea:master Dec 29, 2020
@silverwind silverwind deleted the labelwrap branch January 3, 2021 14:52
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants