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

Table column cog menu should respect edge of the browser window #2263

Closed
simonw opened this issue Feb 8, 2024 · 7 comments
Closed

Table column cog menu should respect edge of the browser window #2263

simonw opened this issue Feb 8, 2024 · 7 comments
Labels
bug javascript minor Minor bugs (not high priority)

Comments

@simonw
Copy link
Owner

simonw commented Feb 8, 2024

Currently causes a horizontal scrollbar:

cog-menu

@simonw simonw added bug minor Minor bugs (not high priority) javascript labels Feb 8, 2024
@simonw
Copy link
Owner Author

simonw commented Feb 8, 2024

There's also a horizontal scrollbar on the table at the bottom of that screenshot and I'm not sure why - it might be due to a plugin that's installed on that instance.

@simonw simonw added this to the 1.0a11 milestone Feb 19, 2024
@simonw
Copy link
Owner Author

simonw commented Feb 19, 2024

Bonus feature: align the tip arrow on the menu with the cog icon that opened it.

@simonw
Copy link
Owner Author

simonw commented Feb 19, 2024

Got this working:

menu-demo

I'm pretty happy with that.

@simonw simonw closed this as completed in 392ca2e Feb 19, 2024
@simonw
Copy link
Owner Author

simonw commented Feb 19, 2024

Found a bug, with tables with long column names like on https://latest.datasette.io/fixtures/custom_foreign_key_label

long-column-name-bug

@simonw simonw reopened this Feb 19, 2024
@simonw
Copy link
Owner Author

simonw commented Feb 19, 2024

Options:

  • With wider column labels move the menu to the right to align with the cog icon
  • Move the little tip as far right on the menu as it can go without detaching from it
  • Make the menu the width of the column

I think the first option will be aesthetically the most pleasant. Need to be careful it doesn't break things if columns are all the way to the left or right of the page.

@simonw
Copy link
Owner Author

simonw commented Feb 19, 2024

Fixed:

long-column-name-fix

@simonw
Copy link
Owner Author

simonw commented Feb 19, 2024

Now live on https://latest.datasette.io/fixtures - I like this a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug javascript minor Minor bugs (not high priority)
Projects
None yet
Development

No branches or pull requests

1 participant