Skip to content

dcc: refactor input #3398

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

Open
wants to merge 10 commits into
base: v4
Choose a base branch
from
Open

dcc: refactor input #3398

wants to merge 10 commits into from

Conversation

KoolADE85
Copy link
Contributor

@KoolADE85 KoolADE85 commented Aug 8, 2025

In this PR:

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
  • 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

@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch from 2b47c08 to 5a49f13 Compare August 8, 2025 23:22
@KoolADE85 KoolADE85 changed the title Feature/dcc refactor input dcc: refactor input Aug 8, 2025
@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch 2 times, most recently from d7fa1ac to 01dac37 Compare August 11, 2025 16:36
@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch from 01dac37 to 1653281 Compare August 11, 2025 17:01
@gvwilson gvwilson added P1 needed for current cycle fix fixes something broken labels Aug 11, 2025
values = str([v["value"] for v in prop_info["value"]])
return f"pt.oneOf({values})"
values = [v["value"] for v in prop_info["value"] if v.get("value") is not None]
return f"pt.oneOf([{",".join(v for v in values)}])"
Copy link
Contributor Author

@KoolADE85 KoolADE85 Aug 12, 2025

Choose a reason for hiding this comment

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

Fixes doubly-quoted strings in an enum of string literals

@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch 2 times, most recently from ffdf944 to 99e0e91 Compare August 12, 2025 22:48
@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch from 99e0e91 to 7ec85f3 Compare August 12, 2025 23:24
@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch from 1b336c2 to 0c175f5 Compare August 12, 2025 23:36
@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch from 4f6b763 to 4a81cbe Compare August 19, 2025 14:37
@KoolADE85 KoolADE85 changed the base branch from dev to v4 August 21, 2025 18:31
@KoolADE85 KoolADE85 force-pushed the feature/dcc-refactor-input branch from 2367abf to 11d7d36 Compare August 21, 2025 18:54
@KoolADE85 KoolADE85 marked this pull request as ready for review August 21, 2025 19:48
@KoolADE85 KoolADE85 requested a review from camdecoster August 21, 2025 19:48
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, just some minor comments.

*
* See: https://dash.plotly.com/loading-states#check-loading-states-from-components
*/
function LoadingElement({children}: LoadingElementProps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is already a LoadingElement in js form, do we need both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one, in typescript, is a slightly different pattern. So once all the components are migrated, I will remove the js version of this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, maybe we can consolidate both, the whole idea behind the LoadingElement was to remove code duplication between the different components where the only difference was the html tag used (so we take it as prop and createElement).

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, can consolidate the loading element later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants