Skip to content

πŸš€ feat(cyclops-ui): Copy Module Name and Namespace buttons#645

Merged
KaradzaJuraj merged 9 commits intocyclops-ui:mainfrom
ArnavK-09:feat/copy-module-info-btn
Oct 27, 2024
Merged

πŸš€ feat(cyclops-ui): Copy Module Name and Namespace buttons#645
KaradzaJuraj merged 9 commits intocyclops-ui:mainfrom
ArnavK-09:feat/copy-module-info-btn

Conversation

@ArnavK-09
Copy link
Contributor

closes #639

πŸ“‘ Description

image

βœ… Checks

  • I have tested my code (provide screenshots or screen recordings of a working solution)
  • I have performed a self-review of my code

β„Ή Additional context

@ArnavK-09 ArnavK-09 requested a review from a team as a code owner October 21, 2024 14:48
@ArnavK-09
Copy link
Contributor Author

@quest-bot loot #639

@quest-bot quest-bot bot added the βš”οΈ Quest Tracks quest-bot quests label Oct 21, 2024
@quest-bot
Copy link

quest-bot bot commented Oct 21, 2024

Quest PR submitted! image Quest PR submitted!

@ArnavK-09, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

@ArnavK-09 ArnavK-09 changed the title feat(cyclops-ui): Copy Module Name and Namespace buttons πŸš€ feat(cyclops-ui): Copy Module Name and Namespace buttons Oct 21, 2024
Copy link
Collaborator

@KaradzaJuraj KaradzaJuraj left a comment

Choose a reason for hiding this comment

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

Hey @ArnavK-09, the icons are currently positioned at the bottom, but I'd like them to be positioned at the top.

You will probably need to change the styling of the <Title> to use flex for the module name copy. For the namespace copy, you can update the styling of the Description.Item

Also, color the icons grey!

@ArnavK-09
Copy link
Contributor Author

Hey @ArnavK-09, the icons are currently positioned at the bottom, but I'd like them to be positioned at the top.

You will probably need to change the styling of the <Title> to use flex for the module name copy. For the namespace copy, you can update the styling of the Description.Item

Also, color the icons grey!

"top"

image

Copy link
Collaborator

@KaradzaJuraj KaradzaJuraj left a comment

Choose a reason for hiding this comment

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

Hey @ArnavK-09 , sorry for doing this but I dislike this solution (my fault, I proposed it).

I think a better solution would be if just by clicking on the module name (or namespace), it copies it to your clipboard.

I propose the following:

  1. Remove the added buttons and styling
  2. Wrap {module.name} & {module.targetNamespace} in <span> with the OnClick effect of copying + style the cursor when hovering to "pointer"
  3. Wrap the new <span> with the <Tooltip> component so that when people hover over the name/namespace, a tooltip will appear to tell them they can copy it
  4. update the tooltip text to "Copy module name to clipboard" and "Copy namespace to clipboard"

Let me know if this makes sense.

@ArnavK-09
Copy link
Contributor Author

Hey @ArnavK-09 , sorry for doing this but I dislike this solution (my fault, I proposed it).

I think a better solution would be if just by clicking on the module name (or namespace), it copies it to your clipboard.

I propose the following:

  1. Remove the added buttons and styling
  2. Wrap {module.name} & {module.targetNamespace} in <span> with the OnClick effect of copying + style the cursor when hovering to "pointer"
  3. Wrap the new <span> with the <Tooltip> component so that when people hover over the name/namespace, a tooltip will appear to tell them they can copy it
  4. update the tooltip text to "Copy module name to clipboard" and "Copy namespace to clipboard"

Let me know if this makes sense.

Yup, this looks better,
I'll implement this asap and resolve this issue
Thanks

@ArnavK-09
Copy link
Contributor Author

Hey @ArnavK-09 , sorry for doing this but I dislike this solution (my fault, I proposed it).

I think a better solution would be if just by clicking on the module name (or namespace), it copies it to your clipboard.

I propose the following:

  1. Remove the added buttons and styling
  2. Wrap {module.name} & {module.targetNamespace} in <span> with the OnClick effect of copying + style the cursor when hovering to "pointer"
  3. Wrap the new <span> with the <Tooltip> component so that when people hover over the name/namespace, a tooltip will appear to tell them they can copy it
  4. update the tooltip text to "Copy module name to clipboard" and "Copy namespace to clipboard"

Let me know if this makes sense.

Like this?

Copy link
Collaborator

@KaradzaJuraj KaradzaJuraj left a comment

Choose a reason for hiding this comment

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

Just a small change to finish this off πŸ˜…

@ArnavK-09
Copy link
Contributor Author

Just a small change to finish this off πŸ˜…

sure, is this alr?

Copy link
Collaborator

@KaradzaJuraj KaradzaJuraj left a comment

Choose a reason for hiding this comment

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

Looking good! Thanks @ArnavK-09 πŸ™

@KaradzaJuraj KaradzaJuraj merged commit 8168fd2 into cyclops-ui:main Oct 27, 2024
@quest-bot
Copy link

quest-bot bot commented Oct 27, 2024

🧚 @ArnavK-09 congratulations for completing Quest #639

πŸ’° A reward has been credited to you.

To claim your reward follow the instructions here.

Questions? Check out the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

βš”οΈ Quest Tracks quest-bot quests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy Module Name and Namespace buttons

2 participants