8000 Cleanup pyscript web elements by fpliger · Pull Request #2094 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

Cleanup pyscript web elements #2094

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 93 commits into from
Jul 3, 2024
Merged

Cleanup pyscript web elements #2094

merged 93 commits into from
Jul 3, 2024

Conversation

fpliger
Copy link
Contributor
@fpliger fpliger commented Jun 5, 2024

Description

Changes

Checklist

  • All tests pass locally
  • I have updated CHANGELOG.md
  • I have created documentation for this(if applicable)

fpliger and others added 26 commits June 4, 2024 16:27
…a specific selector so it now returns an empty collection
… appending elements.Element or a JsProxy object
@WebReflection
Copy link
Contributor

@fpliger there is a merge conflict but the other one looked OK to me after you rlatest cleanup so I've merged it but I wouldn't know how to resolve those conflicts ... any clue?

8000

@fpliger
Copy link
Contributor Author
fpliger commented Jun 6, 2024

@WebReflection
I made a mistake and opened it towards main instead of pydom_pyweb_to_stdlib (this PR #2092) . We were going to keep #2092 as a gate keeper and were going to merge this and the next couple PR there to not have an instable main . I also didn't put a disclaimer on that PR stating that 🤦 so the PR got merged this morning but doesn't change much....

I'll take care of the conflicts and merge later today and just merge all the next PRs to main.

@WebReflection
Copy link
Contributor

@fpliger I thought you made it back to ready for review (but it was already approved) to have it in ... my bad, I should've waited or asked more ... we just released though, we have time to make changes and fixes ... arguably we could also reverse that merge, that's what git is good at 😉

if you have everything under control though, I let you fix the current state, thanks

@fpliger
Copy link
Contributor Author
fpliger commented Jun 6, 2024

ehehe, no worries at all. My bad really.. we were rushing yesterday evening because it was already late so I ended up forgetting both to mention that in the PR and not opening the other PR towards this one. I'm working on it today with @mchilvers and I hope we can get main to a stable state today or tomorrow the latest. 👍 (== before we release again)

Copy link
Member
@ntoll ntoll left a comment

Choose a reason for hiding this comment

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

@WebReflection / @fpliger please have a quick look over this. @mchilvers and I paired on this yesterday and we both feel it's in a ready-to-merge state with a few refinements for the future.

Top of my mind for future refinement is a sort of "minification" strategy in our build step:

  • Python indentation from four spaces to one space.
  • Remove all # comments
  • De-black multiline parenthesis statements. E.g.
x = ("foo", "bar", "baz")  # this
x = (  # Not this
  "foo",
  "bar",
  "baz",
)

A good starting place for this might be a tool like pyminifier which does most of what we want in a vaguely configurable manner. 👍

I'm going to update the docs in line with the changes in this PR.

@@ -53,4 +53,19 @@ export class InstallError extends UserError {
/**
* Keys of the ErrorCode object
*/
export type ErrorCodes = "GENERIC" | "CONFLICTING_CODE" | "BAD_CONFIG" | "MICROPIP_INSTALL_ERROR" | "BAD_PLUGIN_FILE_EXTENSION" | "NO_DEFAULT_EXPORT" | "TOP_LEVEL_AWAIT" | "FETCH_ERROR" | "FETCH_NAME_ERROR" | "FETCH_UNAUTHORIZED_ERROR" | "FETCH_FORBIDDEN_ERROR" | "FETCH_NOT_FOUND_ERROR" | "FETCH_SERVER_ERROR" | "FETCH_UNAVAILABLE_ERROR";
export type ErrorCodes = keyof {
Copy link
Member

Choose a reason for hiding this comment

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

@WebReflection any idea why this might have changed? I'm asking because I think this file has been automatically "cleaned" by a linting tool or autogenerated in some way and I don't have the context for why such a change might have taken place.

@fpliger fpliger requested a review from mchilvers July 3, 2024 20:20
@fpliger fpliger merged commit f8f7ba8 into main Jul 3, 2024
2 checks passed
@fpliger fpliger deleted the cleanup_pyscript_web_elements branch July 3, 2024 21:21
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.

4 participants
0