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

[data-export] Input focus on SOQL query field #153

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

asknet
Copy link
Contributor

@asknet asknet commented Sep 10, 2023

Problem statement:
Whenever I open data export, the query text area isn't focused. It requires another click to set focus and then start typing.

Solution:
This PR allows to set query textarea as focus on load.

Also new to reactjs development. Please review and suggest.

@tprouvot
Copy link
Owner

Hi @asknet
Thanks for this PR !

Could you add the new feature description in CHANGES.md file ? (following current convention)

Could you condition this focus based on a localStorage variable (by default false) ?
Since the auto focus triggers the api call to query the object definition, I would prefer to let users decide if they want to enable this or not ?

We should have an option page where users will be able to enable / disable features from this page.
Waiting for this the configuration can be made from chrome dev console.

Thanks a lot !

@tprouvot tprouvot changed the title QOL: Allow quick typing by setting focus on query textarea [data-export] Input focus on SOQL query field Sep 11, 2023
@asknet
Copy link
Contributor Author

asknet commented Sep 11, 2023

@tprouvot

Thanks for the feedback.

Sure, I will update the CHANGES.md file.
IMO, by default this should be enabled and can be turned off via setting as suggested. Whenever a data export is launched, I'm under the opinion that user wants to type some query. The only exception is they might choose a query from history or saved ones. Even in such cases, making an extra api call for object definition on focus shouldn't pose a concern.

@tprouvot
Copy link
Owner

@asknet
Yes most of the time they will use this page to run a query but not necessarily on the last object queried.
I wouldn't mind to set the autofocus by default to true if the API call is not made.

@toly11
Copy link
Contributor

toly11 commented Sep 17, 2023

I came in here to create a pull request for this exact feature myself:)
Great addition, please merge this.

Copy link
Owner

@tprouvot tprouvot left a comment

Choose a reason for hiding this comment

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

Hi @asknet,
I changed my mind, we can enable this param by default and it can be used to disable it.
Could you accept the suggested changes and also update the CHANGES.md file ?
Thank you !

addon/data-export.js Outdated Show resolved Hide resolved
@asknet
Copy link
Contributor Author

asknet commented Oct 2, 2023

@tprouvot Thank you. I updated it. Kindly, review.

CHANGES.md Outdated Show resolved Hide resolved
@tprouvot
Copy link
Owner

#153

@tprouvot tprouvot merged commit 4056026 into tprouvot:releaseCandidate Oct 20, 2023
@tprouvot
Copy link
Owner

tprouvot commented Dec 2, 2024

Option added to Data Export tab option
image

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.

3 participants