8000 fix autogenerated element by fpliger · Pull Request #397 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

fix autogenerated element #397

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

Merged
merged 3 commits into from
May 16, 2022
Merged

Conversation

fpliger
Copy link
Contributor
@fpliger fpliger commented May 16, 2022

#395 was a temporary fix but this should be the real fix that closes #370 and other issues reporting errors with querySelector selecting elements starting with a -[1-9] value. This fixes the underlying issue.

We were using this.constructor.name that doesn't seem to work well with the current config of terser. Independently of that, the goal here was to generate a meaningful unique id. We can do that with just the static string (at least I can't come up with really strong reasons for having the id to change based on the class name, besides personal taste for semantics).

@fpliger fpliger added status: ready PR that is ready for review tag: component Related to PyScript components labels May 16, 2022
@fpliger fpliger requested a review from philippjfr May 16, 2022 19:33
Copy link
Contributor
@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

I'm fine with this, we don't need the tag ID to be component specific.

@fpliger fpliger merged commit 0476627 into main May 16, 2022
@fpliger fpliger deleted the fpliger/370_fix_autogenerated_element_id branch May 16, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR that is ready for review tag: component Related to PyScript components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML not getting rendered everytime.
3 participants
0