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

Stop file field from hiding filename #2431

Merged
merged 1 commit into from Feb 5, 2024

Conversation

iainbeeston
Copy link
Contributor

Description

On main, even if you choose to display filenames, filenames are hidden for file fields on avo 3.x. This is happening because the parent flexbox is set to flex row and truncate css class was truncating the text down to 0 width.

To fix this I've made the parent flexbox use flex-col, which puts the filename underneath the image (as it was in avo 2.x) so it doesn't get truncated and can be seen.

Fixes # (issue)

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Before it looks like this:

Screenshot 2024-01-30 at 16 37 58

On this branch it looks like this:

Screenshot 2024-01-30 at 16 39 01

Manual review steps

  1. Find a resource with a files component and set display_filename: true is set to true
  2. View it in the browser and confirm that the filename isn't visible
  3. Switch to this branch
  4. Confirm that the filename is visible now.

Manual reviewer: please leave a comment with output from the test if that's the case.

It was hidden before because the parent flexbox was set to flex row
and truncate css class was truncating it to 0 width.

Instead I've made the flexbox use flex-col, which puts the filename
underneath the image (as it was in avo 2.x).
@adrianthedev adrianthedev merged commit 5b365ed into avo-hq:main Feb 5, 2024
19 of 20 checks passed
@adrianthedev
Copy link
Collaborator

Thanks for digging into this @iainbeeston

iainbeeston added a commit to iainbeeston/avo that referenced this pull request Feb 20, 2024
The filename was hidden in both 3.x and 2.x branches but only 3.x received the fix
@iainbeeston iainbeeston mentioned this pull request Feb 20, 2024
4 tasks
Paul-Bob added a commit that referenced this pull request Feb 21, 2024
The filename was hidden in both 3.x and 2.x branches but only 3.x received the fix

Co-authored-by: Paul Bob <69730720+Paul-Bob@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants