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

Adds id to dcc.Loading DOM #2888

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Adds id to dcc.Loading DOM #2888

merged 3 commits into from
Jun 18, 2024

Conversation

leeagustin
Copy link
Contributor

@leeagustin leeagustin commented Jun 15, 2024

Hi!👋 This is my first time contributing to an open-source project. I hope it's okay if I give the issue (#2878) a try.

I didn't add a test as I was unsure if it was needed for this (small) change; however, I'd be more than happy to add one if needed!

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Adds id to dcc.Loading DOM
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community

@huong-li-nguyen
Copy link

Congrats on your first PR in an open-source project! 🎊

I forgot about raising the PR 😬 but happy that it lets you create your first PR! 👏

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

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

I don't think we need to add new tests, but the existing ones could be modified to include an id here:

@@ -148,6 +149,7 @@ const Loading = ({
{showSpinner &&
(custom_spinner || (
<Spinner
id={id}
Copy link
Contributor

Choose a reason for hiding this comment

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

The id should be on the outer div, the spinners https://github.com/plotly/dash/blob/4692acf61f3e282950a8d1014b152176addb2aec/components/dash-core-components/src/fragments/Loading/spinners/ don't have the id prop so it wouldn't render on the DOM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see, good catch 😄

Changed in 9dcf243

@leeagustin
Copy link
Contributor Author

I don't think we need to add new tests, but the existing ones could be modified to include an id here:

Sounds good!

Changed in ca5d66a

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

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

Looks good, thank you 💃

@T4rk1n T4rk1n merged commit 66d564e into plotly:dev Jun 18, 2024
3 checks passed
@leeagustin leeagustin deleted the dcc-Loading-id-DOM branch June 22, 2024 19:14
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.

None yet

3 participants