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: bills explore table styles #161

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

Conversation

runyasak
Copy link
Contributor

What have been done

I updated the width of the proposedOn cell in the Bills Explore page to ensure the text stays on one line for small screen. Additionally, I removed the margin from the BillStatusTag to align it with the content.

Screenshot (if any)

  • Before
Screenshot 2568-01-23 at 23 10 58
  • After
Screenshot 2568-01-23 at 23 10 40

If you have any feedback or suggestions, please let me know.

@@ -180,19 +180,19 @@
</div>
<svelte:fragment slot="table" let:cellKey let:cellValue>
{#if cellKey === 'proposedOn'}
<span class="body-compact-01 text-gray-60"
>{new Date(cellValue).toLocaleString('th-TH', {
<div class="body-compact-01 w-20 text-gray-60">
Copy link
Contributor

Choose a reason for hiding this comment

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

We better not fix the width, because some users might set font size higher than usual (my parents did) and fixing the width won't guarantee that text will be in the same line.

I suggest you to use whitespace-nowrap (CSS white-space: nowrap;) instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I missed the point, and I understand your concerns. I’ve encountered many users who use a large font size on their machines.

I can ensure that w-20 (which applies width: 5rem) will be responsive to the browser's root font size because it uses rem.

Therefore, should I add whitespace-nowrap and adjust the width for the cell?
If you have any specific preferences such as width, please let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

That is a good point, however, I still suggest using nowarp solution. Because it will guarantee that the cell width will just fit the one-line text, no more no less. And no need for us to try picking the closest width that works.

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.

2 participants