10000 Fix input file styles by wrozka · Pull Request #8574 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

Fix input file styles #8574

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wrozka
Copy link
Contributor
@wrozka wrozka commented Dec 12, 2024

This PR imports file input styles from Flowbite and fixes display issue in Safari.

Current look of file inputs:
Screenshot 2024-12-12 at 16 23 00

File inputs after fix:
Screenshot 2024-12-12 at 16 23 22

plugin.js Outdated
width: '100%',
cursor: 'pointer',
overflow: 'hidden',
'border-radius': '.5rem',
Copy link
Contributor
@tagliala tagliala Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi and thanks for this PR.

The border-radius seems off to me by taking a look at the screenshot, and it's confirmed because of .375rem in the other buttons

Can you please use the settings from the theme?

I can see

        'border-width': borderWidth['DEFAULT'],

in this file. Don't know exactly how. flowbite works. It looks like it is using rounded-md class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tagliala Thanks, done! I've updated the PR to use theme config as much as possible. I reviewed the file again and I've realised I could replace all those styles with just one big @apply:

[`[type='file']`]: {
  @apply block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 overflow-hidden;
}

Do you have preferred style? I've seen both inlines and applies in this file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Do you have preferred style?

Can't tell exactly, not my expertise, let's wait for @javierjulio 's review, I guess it should be a mix of both but I can't tell exactly what should be in a class and what in that definition

8000
Copy link
codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.11%. Comparing base (bd735ef) to head (bd48e13).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8574   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files         141      141           
  Lines        4076     4076           
=======================================
  Hits         4040     4040           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wrozka
Copy link
Contributor Author
wrozka commented Dec 30, 2024

@javierjulio Did you have a chance to take a look at this PR? What do you think?

@aalyahya
Copy link
Contributor

Is there anything I can help with to get this PR merged? @tagliala @javierjulio

@tagliala
Copy link
Contributor

I'm sorry, the result looks good to me, but I can't approve this PR

@tagliala tagliala requested a review from javierjulio January 28, 2025 18:25
@tagliala tagliala mentioned this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0