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

Allow scratch name to be highlighted and copied for non-owners #1359

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

PerikiyoXD
Copy link
Contributor

This pull request includes changes to the ScratchToolbar component to improve the user experience by allowing the scratch name to be highlighted and copied.

Improvements to user experience:

Fixes #1354

@@ -115,7 +115,7 @@ function ScratchName({ name, onChange }: { name: string, onChange?: (name: strin
/>
} else {
return <div
className={classNames(styles.name, { [styles.editable]: !!onChange })}
className={classNames(styles.name, styles.scratchName, { [styles.editable]: !!onChange })}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make more sense to add these css attributes to the .name class instead? and then make cursor: text; the default rather than only when &.editable ?

@mkst
Copy link
Collaborator

mkst commented Oct 10, 2024

Great stuff!

@mkst mkst merged commit fa4e22c into decompme:main Oct 10, 2024
7 checks passed
mkst pushed a commit that referenced this pull request Oct 11, 2024
* Add scratchName class to allow highlighting and copying the scratch name

* Use .name to allow selecting scratch name
mkst pushed a commit that referenced this pull request Oct 27, 2024
* Implement ASM Diff contents Copy Button (#1357)

* Implement diff copy button

* Make vercel deployment happy

* Make vercel deployment happier

* Just remove the alert

* Tweak styles

* Retrigger deployments

* Lazy loaded and refactored CopyButton component logic

* Allow scratch name to be highlighted and copied for non-owners (#1359)

* Add scratchName class to allow highlighting and copying the scratch name

* Use .name to allow selecting scratch name

* Properly center the copy button icon

---------

Co-authored-by: PerikiyoXD <[email protected]>
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.

[BUG] ScratchName element in ScratchToolbar is not selectable if user is not scratch owner
2 participants