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

Macro button style changes #342

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

Macro button style changes #342

wants to merge 10 commits into from

Conversation

Q1WP
Copy link
Contributor

@Q1WP Q1WP commented Jan 18, 2023

What about this version?

It leaves the overflow hidden and sets a button width.

Desktop view:
desktop-view

Mobile view:
phone-view

@jcoffland
Copy link
Member

Visually, I prefer the fixed width buttons in a grid. But, this does let you use longer names. My intent was that the user would be forced to used names that fit like. Rot Laser instead of Rotary Laser.

Another idea is to scale the text automatically to fit. I wasn't sure if this was possible at first but there is a way using SVG. We would go back to the grid and replace the text in the button with something like this:

<svg viewBox="0 0 56 18">
  <text x="0" y="15">Rotary Laser</text>
</svg>

Actually we would need to change a line in vue-control.pug from:

| {{macro.name || ($index + 1)}}

To:

svg(viewBox="0 0 56 18")
  text(x="0" y="15") {{macro.name || ($index + 1)}}

I'm not sure what the numbers above should be. 56 is the button width in SVG space and 18 is it's height. 15 is the vertical offset of the text with in the SVG. In theory, it should automatically scale with the text size. It might be necessary to add something like this to the style:

.macros svg
   width 100%

The hope would be that the font just shrinks as the text gets longer but the button stays the same size. Totally untested though.

@Q1WP
Copy link
Contributor Author

Q1WP commented Jan 18, 2023

I'm not really a fan of different size text on a page as the text is the focal point and provides relative info to the user. I understand the uniformity of button sizes, but being a production user, functionality and ease of use is priority to me. Obviously this is your project to choose which direction to go, but I definitely can't help with the css/svg setup, as that is way over my head.

@jcoffland jcoffland force-pushed the master branch 2 times, most recently from 569814f to 0951758 Compare June 1, 2023 15:51
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