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

Display issue with "View hashes" button #7457

Closed
NathanBnm opened this issue Feb 27, 2020 · 3 comments · Fixed by #7468
Closed

Display issue with "View hashes" button #7457

NathanBnm opened this issue Feb 27, 2020 · 3 comments · Fixed by #7468
Assignees
Labels
CSS/SCSS requires change to CSS/SCSS files HTML requires change to HTML files

Comments

@NathanBnm
Copy link
Contributor

NathanBnm commented Feb 27, 2020

The "View hashes" button text seems to be truncated when displayed in different languages. Don't know if it's due to translations or if it's a native bug, but here it is.

The corresponding string is located in the templates/packaging/detail.html file at line 321.

Here is a screenshot of the English version:
image

And here in the French version:
image

The "hashes" word is not displayed. Maybe it's because of the <span> element surrounding it.

@NathanBnm NathanBnm added i18n Internationalization translation Issues relating to PyPI translations labels Feb 27, 2020
@di
Copy link
Member

di commented Feb 27, 2020

Looks like this was added in #6561, perhaps by mistake. I don't see why the span tag need to be there, @nlhkabu care to chime in?

@di di added HTML requires change to HTML files and removed i18n Internationalization translation Issues relating to PyPI translations labels Feb 27, 2020
@nlhkabu nlhkabu self-assigned this Feb 27, 2020
@nlhkabu nlhkabu added the CSS/SCSS requires change to CSS/SCSS files label Feb 27, 2020
@nlhkabu
Copy link
Contributor

nlhkabu commented Feb 27, 2020

Thanks for opening this ticket @NathanBnm.

@di - I think there is a reason for the span - my gut feeling is that it has something to do with mobile, but I will take a look :)

@nlhkabu
Copy link
Contributor

nlhkabu commented Feb 28, 2020

On further investigation:

The markup has a <span> in it because "hashes" is hidden when the table header is visible, so the button only says "view":

Screenshot from 2020-02-28 21-48-46

On mobile, the button switches to "view hashes" because the column title is hidden:

Screenshot from 2020-02-28 21-49-31

This obviously does not work for translation, so I will update the code to:

  • Make the button always say "View"
  • Ensure the "Hashes" title is visible, even on the smallest mobile screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS/SCSS requires change to CSS/SCSS files HTML requires change to HTML files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants