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

fix: Improve styles of layout for QuestionFile #2253 #2259

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

Koc
Copy link
Collaborator

@Koc Koc commented Jul 28, 2024

See #2253 for more info. I'm not css-guy, so, if you have any suggestions how to fix it in a proper way - welcome 🙏

Fixed version has same height and paddings line other input types for both edit/view versions:
image
image

@Koc Koc requested a review from Chartman123 July 28, 2024 22:43
@Chartman123
Copy link
Collaborator

@Koc thanks for looking into it. Perhaps @susnux can also have a look at it, as I'm not an CSS expert either...

@Chartman123 Chartman123 requested a review from susnux July 28, 2024 22:45
@Koc
Copy link
Collaborator Author

Koc commented Jul 28, 2024

I guess for a long term it would be nice to add type=file support to NcActionInput

@Koc Koc force-pushed the fix/fix-file-layout-issue branch from a1b8f64 to ca2520e Compare July 28, 2024 22:55
@susnux
Copy link
Collaborator

susnux commented Jul 29, 2024

Just use the variables, but otherwise fine :)

@Koc
Copy link
Collaborator Author

Koc commented Jul 30, 2024

@susnux for some reason it not works for me with variables 😕

Input should have height: 44px for edit mode, but variable is only 34px

image
image

Seems like it's overwritten with min-height: 44px without variables.

@Koc Koc force-pushed the fix/fix-file-layout-issue branch from ca2520e to b74f61e Compare July 30, 2024 22:30
@susnux
Copy link
Collaborator

susnux commented Aug 6, 2024

Input should have height: 44px for edit mode, but variable is only 34px

No starting with Nextcloud 30 all inputs should be 34px, that why we should only use the variables to be independent from the server version.

@Koc
Copy link
Collaborator Author

Koc commented Aug 6, 2024

ok, but how can I properly calculate paddings?

@Chartman123 Chartman123 added this to the 4.3 milestone Aug 8, 2024
@Chartman123 Chartman123 linked an issue Aug 8, 2024 that may be closed by this pull request
@susnux
Copy link
Collaborator

susnux commented Aug 14, 2024

ok, but how can I properly calculate paddings?

Paddings should always be multiple of --default-grid-baseline, if it is about centering then probably something like this:
calc((var(--default-clickable-area) - 1lh) / 2) (this would be the padding needed to center something).

@susnux
Copy link
Collaborator

susnux commented Aug 14, 2024

I pushed another commit with unifies the style with other inputs form Nextcloud. Note that it might look not 100% equal currently (border width), but this is due to a missing fix for e.g. NcDatetimePicker which will be release this week.

Feel free to adjust or even drop my commit if you want to adjust :)

Screenshot 2024-08-14 at 18-58-14 oo - Formulare - Nextcloud

@susnux susnux added bug Something isn't working design Related to the design 3. to review Waiting for reviews labels Aug 14, 2024
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Konstantin Myakshin <[email protected]>
@Koc Koc force-pushed the fix/fix-file-layout-issue branch from a7889ec to 5ca10d1 Compare August 14, 2024 21:50
@Koc
Copy link
Collaborator Author

Koc commented Aug 14, 2024

@susnux mate, it looks really amazing, thank you. This css is too hard for backend developers like me 🙈 . I've fixed formatting to pass pipeline

@Koc
Copy link
Collaborator Author

Koc commented Aug 14, 2024

I guess for a long term it would be nice to add type=file support to NcActionInput

we have ticket for that™ nextcloud-libraries/nextcloud-vue#4339

@Chartman123
Copy link
Collaborator

@Koc yeah nice, so we could switch in the future, when it's integrated into the lib

Until then: let's get this merged :)

@Koc Koc merged commit db224cf into main Aug 14, 2024
42 checks passed
@Koc Koc deleted the fix/fix-file-layout-issue branch August 14, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working design Related to the design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout issue with Upload type question.
3 participants