-
Notifications
You must be signed in to change notification settings - Fork 83
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
[general] Lightning navigation #409
base: releaseCandidate
Are you sure you want to change the base?
Conversation
…ll, and isCustomSetting is undefined
Hi @toly11, |
Hi @tprouvot, What do you think? |
Ok @tprouvot, |
Hey @tprouvot, Kindly, please review Thanks |
The result looks great @toly11 👏 |
Great to hear about the test results! Regarding the suggestion, are you referring to the show all data link which navigates to an extension page? |
Few remarks concerning the inject.js script, today it is inserted in the page even if the user doesn't interact with the extension. Would you be able to remove the |
Hi @toly11 |
Good point. It will probably be better to add and remove the event listener directly in button.js in the openPopup, and closePopup functions, right? what do you tnink Edit: I tried injecting the inject.js script when the popup opens and removing it when it closes, alongside removing the event listener. While this is feasible, it introduces a delay of up to a second or two from the time appendChild is called until the script is fully loaded in the DOM. If a user clicks a link before the script is loaded and the event listener is initialized, navigation will not work. Given this potential issue, I recommend keeping the current setup where the event listener is created even if the user hasn't opened the popup yet. What do you think? |
Do you think we should also remove the debug when Lightning navigation fails? (addon/inject.js:19) |
Sure. Where will it be bast to document this? |
I think you can add a comment directly in the header file just to explain why it was done like this. |
We can keep the log but use the .error method instead (suggestion done in the review) |
I'm thinking about one think also, since we have an option to open the links in a new tab, we should mention that enabling this will prevent the lightning navigation to be used. So I think we should add this info in the how-to page and add a tooltip in the option.js |
Hi @toly11, I've addressed the suggested action on how-to file and option page. |
Co-authored-by: Thomas Prouvot <[email protected]>
Did you create a suggestion, or should I create a new commit? |
I screwed up my local branch, I'll push it as suggestions |
Hi @toly11, Last thing, I would like to have a setting which allows users to enable / disable this functionality. Now the question is : should we enabling it by default or not ? What we can do is to enabling it by default on the beta version and see if we have some complains. |
Hi @toly11, |
Overview
This pull request enhances navigation within Salesforce pages from the popup menu by integrating Lightning Navigation. Previously, clicking a link triggered a full page reload, which could take several seconds. Now, Lightning Navigation allows users to redirect to new locations without reloading the entire page. Should Lightning Navigation fail, the system gracefully falls back to standard navigation.
Additionally, this update maintains functionality for opening links in new tabs based on user settings, including detecting when users hold down the ctrl/command key to open a new tab.
During this update, I also addressed a bug where navigating to a custom settings object from the objects tab would inconsistently open the Object Manager instead of the intended custom settings page. Additionally, I fixed an issue where Object Manager setup URLs were not functioning properly for Knowledge objects
Testing
Extensive testing was conducted in various environments to ensure compatibility and seamless integration with the existing functionalities of Inspector. I encourage further testing to validate the efficiency and usability enhancements of this feature. All unit tests have been executed as per the guidelines outlined in our contribution guide.
Documentation
Changes have been documented in the CHANGES.md file.
Request for Review
I kindly request a review of this pull request. I am open to making any necessary adjustments based on your feedback.
Thank you.
Video before:
before.mp4
Video after:
after.mp4