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

[ui] Copyable server and client attribute values #16548

Merged

Conversation

philrenaud
Copy link
Contributor

Resolves #16539

Adds Copy buttons to server and client attribute values:

image

In order to get this working within the confines of a (potentially overflow:hidden) table row, added the @inset argument, which will modify the background to be transparent, the dom placement to be inline, and to not show a "Copied!" message and defer instead to just the checkmark icon.

@philrenaud philrenaud self-assigned this Mar 17, 2023
@philrenaud philrenaud linked an issue Mar 17, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Mar 17, 2023

Ember Asset Size action

As of d9cdb83

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +2.34 kB +483 B
nomad-ui.css +139 B +25 B

Files that stayed the same size 🤷‍:

File raw gzip
vendor.js 0 B 0 B
vendor.css 0 B 0 B

@github-actions
Copy link

github-actions bot commented Mar 17, 2023

Ember Test Audit comparison

main d9cdb83 change
passes 1485 1485 0
failures 0 0 0
flaky 0 0 0
duration 11m 36s 542ms 10m 55s 720ms -40s 822ms

Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

ty! 😁

Copy link
Contributor

@ChaiWithJai ChaiWithJai left a comment

Choose a reason for hiding this comment

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

Looks like a pretty easy win to migrate CopyButton to Glimmer while we're here.

import classic from 'ember-classic-decorator';

@classic
@classNames('copy-button')
@classNameBindings('inset')
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: There are only 6 invocations of the CopyButton component. Rather than persisting ember-classic pattern, this seems like an easy win for us to migrate to Ember Octane via a Glimmer component!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gave it a shot, including upgrading ember-cli-clipboard, and ran into errors. Seems not worth holding up this feature for.

Copy link
Contributor

Choose a reason for hiding this comment

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

I got it up and running pretty immediately. Which errors did you run into? Do you think we'll run into similar errors on the upgrade path to Ember 4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please open a PR! All look and feel was fine but no events were firing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Roger dodger!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.5.x backport to 1.5.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui] Make it easy to copy values from client/server pages
3 participants