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

fix: use private variables for selection info #5289

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

dlockhart
Copy link
Member

I noticed that when you console.log the SelectionInfo class in dev tools, the "private" _keys and _state variables bubble to the top and make it less obvious that you shouldn't be using them.

Screenshot 2025-01-06 at 4 37 22 PM

This switches things over to actually use private variables. I've updated the 2 repos that were incorrectly accessing the _ versions.

@dlockhart dlockhart requested a review from a team as a code owner January 7, 2025 14:13
Copy link
Contributor

github-actions bot commented Jan 7, 2025

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5289/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Copy link
Contributor

@dbatiste dbatiste left a comment

Choose a reason for hiding this comment

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

LGTM!

Would be nice if the console applied the bold opposite but I am guessing they have some reason that goes back years. 🤷‍♂️

@dlockhart
Copy link
Member Author

Would be nice if the console applied the bold opposite...

Unfortunately even with this change, it still bolds the private variables. Likely an oversight. At least now consumers can't actually access them!

Screenshot 2025-01-07 at 9 18 06 AM

@dlockhart dlockhart merged commit 0988f6b into main Jan 7, 2025
6 checks passed
@dlockhart dlockhart deleted the dlockhart/use-private-vars branch January 7, 2025 14:21
Copy link

🎉 This PR is included in version 3.79.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants