Skip to content

Conversation

@AyushPrakash414
Copy link

Fixes #57

This PR adds a copy button for Thing Description affordances (actions, properties, and events) in the visual editor.

Users can now duplicate similar affordances directly from the UI without switching to the JSON editor, improving usability and workflow efficiency.

@netlify
Copy link

netlify bot commented Jan 9, 2026

Deploy Preview for editdor ready!

Name Link
🔨 Latest commit 6156d33
🔍 Latest deploy log https://app.netlify.com/projects/editdor/deploys/6964ce1c488bb40008b9d8c9
😎 Deploy Preview https://deploy-preview-181--editdor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@egekorkan egekorkan left a comment

Choose a reason for hiding this comment

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

  • handleCopyXXX functions can be refactored to not copy paste the same thing
  • You need to sign your commits and link your Eclipse account. Make sure to read https://github.com/eclipse/editdor/blob/master/CONTRIBUTING.md
  • It would be muuuch better if the new affordance is just under the copied affordance. With longer TDs, it is very difficult to find it. Also, there is no visual confirmation that a new affordance is added.

Signed-off-by: Ayush <prakashayush414@gmail.com>
@AyushPrakash414 AyushPrakash414 force-pushed the feature/copy-affordance branch from c92bfab to d2879cf Compare January 12, 2026 09:48
Signed-off-by: Ayush <prakashayush414@gmail.com>
@AyushPrakash414
Copy link
Author

  • handleCopyXXX functions can be refactored to not copy paste the same thing
  • You need to sign your commits and link your Eclipse account. Make sure to read https://github.com/eclipse/editdor/blob/master/CONTRIBUTING.md
  • It would be muuuch better if the new affordance is just under the copied affordance. With longer TDs, it is very difficult to find it. Also, there is no visual confirmation that a new affordance is added.

Changes include:

  • Refactored affordance copy logic into a shared helper
  • Insert copied affordance directly below the original
  • Added visual confirmation via auto-expand and scroll

All commits are signed and Eclipse Contributor Agreement requirements are fulfilled.

@AyushPrakash414
Copy link
Author

Hi @egekorkan
Just a gentle follow-up on this PR.
Please let me know if any changes or improvements are needed from my side.
Thanks for your time!

@egekorkan
Copy link
Contributor

@AyushPrakash414 much better, thank you! I think the visual confirmation should be a bit more pronounced. Even with the expectation how this should work, I had to double check (<1s for me). Maybe highlighting the new affordance would be nice, like an animation.

Also, code formatting check is failing :)

@egekorkan egekorkan requested a review from TejInaco January 19, 2026 11:18
@TejInaco
Copy link
Contributor

TejInaco commented Jan 19, 2026

Hello @AyushPrakash414 thanks for your contribution. The initial feedback is:

  1. Please run: yarn format to fix the formatting errors. To check if the pipeline will failed, locally you can do a double check by running yarn prettier --check .

  2. Your account seems confirmed by the Eclipse Foudantion, then you have to edit your commits in this PR to sign them all, in your terminal git rebase --exec "git commit --amend --no-edit -S" HEAD~2 and then you can do a push --force-with-lease. Be aware there is a difference between the -s and -S flag in git commit 👍

  3. We are pushing to increase the tests in our codebase. So far all the files under utils folder must have unit tests. Create a copyAffordance.test.ts file and do the unit tests for your function. If you are using vscode, the extension vite is very useful.

A review will follow. Thanks!

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.

Adding a copy button for affordances

3 participants