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

[Feature]: On Button Strg + Click | Center Mouse Button Click #10540

Open
1 task done
lublak opened this issue Jan 21, 2022 · 9 comments
Open
1 task done

[Feature]: On Button Strg + Click | Center Mouse Button Click #10540

lublak opened this issue Jan 21, 2022 · 9 comments
Assignees
Labels
Community Reported issues reported by community members Enhancement New feature or request Javascript Product Issues related to users writing javascript in appsmith JS Usability usability issues with JS editor and JS elsewhere Needs PRD Issue which are awaiting PRD Query & JS Pod Issues related to the query & JS Pod

Comments

@lublak
Copy link

lublak commented Jan 21, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Summary

onCtrlClick/onCenterClick/onNewTabClick?

Why should this be worked on?

You are used to perform an action with a Ctrl + Click or with the middle mouse button other than with a simple click. Namely that the action open in a new browser tab.
Currently I use onClick to open a modal. It would be practical if the person clicks a Ctrl + Click or with the middle mouse button that I do not open a modal but that I can use e.g. simply navigateTo.

@lublak lublak added the Enhancement New feature or request label Jan 21, 2022
@rohan-arthur rohan-arthur added the Community Reported issues reported by community members label Jan 22, 2022
@Nikhil-Nandagopal Nikhil-Nandagopal added the Button Widget Issues related to the button widget label Jan 24, 2022
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets UI Building Pod labels Jan 24, 2022
@somangshu somangshu added the Needs PRD Issue which are awaiting PRD label Jan 24, 2022
@dilippitchika
Copy link
Contributor

Hey @lublak I did not fully understand the request, do you mean to say that you need a new action called onCtrlClick which does a totally different behavior than onClick?

@lublak
Copy link
Author

lublak commented Jan 28, 2022

@dilippitchika yes. For some information you can either use "middle mouse button" or "crtl click" to open any link in a new tab (just try it out) . So i use onClick to open it in a modal. But users are also know the "middle mouse button" or "crtl click" action so they can open multiple tabs directly.
I don't know yet what to call it, because you can combine both to e.g. "onNewTabClick".

@dilippitchika
Copy link
Contributor

dilippitchika commented Jan 31, 2022

Hey @lublak understood it now.

I have seen this behavior typically with links only where the user either wants to open the link the same or a different page, haven't seen a scenario where the whole action is different on ctrl click.

For example clicking the button "Comment" below here doesn't open something in new tab. Don't you think it's hard to discover this behavior for non-link cases? Also is the content you are trying to show in modal vs in page different?

Any examples for that?

@lublak
Copy link
Author

lublak commented Jan 31, 2022

@dilippitchika

Currently I use a button (with white background and blue text that it looks like a link) to open a modal with an iframe in it.
Now I would like when the person performs this "ctrl click" action not to open the modal with the iframe but the page itself.
So for a click: open modal with iframe
And for a "ctrl click": navigateTo

@dilippitchika
Copy link
Contributor

Thanks a lot for explaining, i got the idea now! Will prioritise this.

@Nikhil-Nandagopal
Copy link
Contributor

@dilippitchika maybe we should have a way to inspect the keypress from the onClick so a user can make a decision instead of adding a new event handler? I'm not sure any button component supports this property out of the box

@dilippitchika
Copy link
Contributor

@Nikhil-Nandagopal I was thinking in a similar direction, is some event emitter available for other events which are there? Just trying to understand what this property will look like - in my head the property was somewhat like "ctrlClick": true/false.

Need some info on how this will look in the autocomplete.

@Nikhil-Nandagopal
Copy link
Contributor

Nikhil-Nandagopal commented Feb 2, 2022

@dilippitchika it could be that the onClick has an event variable that has information like the message users can access like currentRow / currentItem in the columns of a table

@somangshu somangshu added the JS Usability usability issues with JS editor and JS elsewhere label Feb 10, 2022
@github-actions github-actions bot added Javascript Product Issues related to users writing javascript in appsmith Actions Pod labels Feb 10, 2022
@somangshu
Copy link
Contributor

@ajinkyakulkarni need some help from you. Would the POD have some expertise to provide a solution here?

@somangshu somangshu removed Widgets Product This label groups issues related to widgets Button Widget Issues related to the button widget labels Feb 10, 2022
@Nikhil-Nandagopal Nikhil-Nandagopal added the Query & JS Pod Issues related to the query & JS Pod label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Reported issues reported by community members Enhancement New feature or request Javascript Product Issues related to users writing javascript in appsmith JS Usability usability issues with JS editor and JS elsewhere Needs PRD Issue which are awaiting PRD Query & JS Pod Issues related to the query & JS Pod
Projects
None yet
Development

No branches or pull requests

6 participants