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

[bug]: Renaming request from left menu not working properly #154

Open
arp99 opened this issue Nov 21, 2023 · 7 comments
Open

[bug]: Renaming request from left menu not working properly #154

arp99 opened this issue Nov 21, 2023 · 7 comments
Assignees

Comments

@arp99
Copy link

arp99 commented Nov 21, 2023

Describe the bug
A clear and concise description of what the bug is.
When the request is not opened in any tab, and the user tries to rename the request from the dropdown available in the 3 dot. It opens a input box, but when the user tries to click on the input box the request gets selected, instead of the cursor getting inside the input box.

To Reproduce
Steps to reproduce the behavior:

  1. Go to your workspace
  2. Create a folder inside a collection
  3. Create a request inside the folder, and close any open tabs of the request
  4. Now try to rename the request by clicking on the 3 dots beside the request name
  5. It will open a input box, but now try to click inside the input box.

Expected behavior
A clear and concise description of what you expected to happen.

  1. Ideally the input box should get active, without the opening the request tab
  2. and on user entering the updated name and pressing enter or the square that appear on right, should rename the request

Screenshots
If applicable, add screenshots to help explain your problem.

Screen.Recording.2023-11-21.at.7.29.32.PM.mov

Desktop (please complete the following information):

  • OS: macOs Sonoma
  • Browser : Chrome
  • Version : Version 119.0.6045.159

Additional context
Add any other context about the problem here.

@arp99
Copy link
Author

arp99 commented Nov 21, 2023

Can the project admins review the issue and assign me the issue, I want to start contributing to this project

@Nishchit14
Copy link
Contributor

Thank you @arp99 for filing this issue. I have assigned it to you, you can start contributing it.

@arp99
Copy link
Author

arp99 commented Nov 22, 2023

@Nishchit14 This seems to be a problem with the react-complex-tree the project is using to render the collection tree, the input box is being rendered by the library itself. Correct me If I am wrong. Basically we need to get access to the synthetic event object of the click event on the input box, for this reason there is another linked issue to it. User can rename and keep blank folder or request names. Need to add a custom rename input box to handle all such situations, and remove the library dependency from that.
Let me know your thoughts on this

@Nishchit14
Copy link
Contributor

The input box is being rendered by the library itself.

yes, that's true

Need to add a custom rename input box to handle all such situations, and remove the library dependency from that.

we're using the react-complex-tree for API collection tree UI to get rich accessibility. Here we can not remove the library deps easily. @lukasbach (creator of the lib ) is a very helpful person, you can ask on their own repo for the solution.

@Nishchit14
Copy link
Contributor

I think this solution would work @arp99

Try to check that the tree has a renaming state with this api treeRef.current.isRenaming at this line

treeRef.current.isRenaming

here is the API https://rct.lukasbach.com/docs/api/interfaces/TreeRef#isrenaming

@Nishchit14
Copy link
Contributor

@arp99 have you tried it?

@arp99
Copy link
Author

arp99 commented Nov 24, 2023

@arp99 have you tried it?

Bit busy with work, will try to resolve it by weekend

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

No branches or pull requests

2 participants