-
Notifications
You must be signed in to change notification settings - Fork 157
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 filename column width in responsive mode #2999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice!
dac040b
to
4d111c9
Compare
@kulmann please recheck all, I've also added "flip: false" now to the new file menu after rebasing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
} | ||
} | ||
} | ||
</script> | ||
<style scoped> | ||
/* FIXME: move to ODS, it is useful to have a column as wide as just an icon */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you are raising a ticket for this, add icon size classes as an idea. So oc-icon-width
with the default icon width, then oc-icon-width-xsmall
, oc-icon-width-medium
, etc.
4d111c9
to
9f6db0e
Compare
Indeed I can just set "oc-icon" on the header div to get the width, done that now. After rebasing on top of master and getting #1952, I have now a bigger alignment problem: So now I'd need to set the column width to 39px instead of just 24px to accommodate for that. The 24px only works fine when no scrollbar is here. I don't think I can detect the scrollbar width, and it would be hacky anyway. Any suggestions ? Would it be possible to have a fixed table header but still have the scrollbar pushing the layout ? @LukasHirt |
Conditions have changed after rebase
Idea: use JS to measure the width of the name column in the body (it's the one that expands as far as possible) and then apply the same with to the name column in the header. This would help align the column headers and is likely easier than trying to guess the scrollbar size. Otherwise I'd wish for a way with CSS to tell the browser to not count the scrollbar as being part of the layout, like Mac OS does. |
It seems there used to be a value called |
Seems we have an even bigger undiscovered problem: the share indicators column doesn't have a fixed width for neither the header nor the body... It seems we'd need the same calculation here as well. |
@PVince81 what about calculating the width of |
I have an ugly but working solution now: copy all column widths from the table rows to the header to have consistent sizes. @kulmann processing column-wise is necessary because of the share indicators column width which is not predictable when using extensions (it's not always just two icons). Adjusting the parent's width wouldn't be enough to help with header label alignments. I'm unsure yet whether I'll want to merge this solution but please do have a look and let me know what you think. @LukasHirt @kulmann |
if this become a thing for more tables (at least the ones with RecycleScroller), we could consider wrapping all this ugliness into a separate vue component in the future... |
After some thought I think I'll still try the other solution of setting the width of the parent, the share indicator column is likely not relevant there.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments. Edit: lol, outdated. ^^
@kulmann you were right, it seems to work fine! See last commit. If all agree I'll squash. There's a little UIKit bug I found while switching between multiple responsive mode: in some cases it seems UIKit is setting "uk-first-column" on the wrong column, here "Updated" which causes an additional top padding. I'd consider this unrelated but we could probably work it around later. |
Yes, please squash. On mac this works fine. When you squashed I'll review again tomorrow, early in the morning. |
8641381
to
95400cf
Compare
As discussed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
I'll add a changelog entry for this as a bugfix since it did not make it into 0.4.0 |
- Removed uk-width-small and now using the icon width for column alignment. This gives more space in responsive mode for the file name column. - Removed the "More" column header label which felt redundant. - Adjusted file actions button id to not mention size any more, now that we only have a single size. - Share indicator column now always present even when indicators are not rendered, for consistency with the header. - On resize, copy the table body row width to the header row to make sure that headers stay aligned when a scrollbar appears in the body as the scrollbar does not cover the header part as the latter is fixed/frozen on scroll.
95400cf
to
7aa2369
Compare
Description
Removed uk-width-small and now using the icon width for columnalignment. This gives more space in responsive mode for the file name
column.
Removed the "More" column header label which felt redundant.
Adjusted file actions button id to not mention size any more, now that
we only have a single size.
alignment. This gives more space in responsive mode for the file name
column.
we only have a single size.
rendered, for consistency with the header.
that headers stay aligned when a scrollbar appears in the body as
the scrollbar does not cover the header part as the latter is
fixed/frozen on scroll.
Related Issue
Fixes #2998
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: