8000 chore: improve paraglide by AdrianGonz97 · Pull Request #104 · sveltejs/cli · GitHub
[go: up one dir, main page]

Skip to content

chore: improve paraglide #104

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 6 commits into from
Oct 13, 2024
Merged

chore: improve paraglide #104

merged 6 commits into from
Oct 13, 2024

Conversation

AdrianGonz97
Copy link
Member
@AdrianGonz97 AdrianGonz97 commented Oct 13, 2024

there were improvements I wanted to apply before it was merged

things to fix:

  • onclick shouldn't be wrapped in a string <button onclick="{() => switchToLanguage('en')}">en</button>
  • <ParaglideJS> component was poorly wrapped
  • add a new line after imports:
    img
  • the code above is broken as the lang="ts" is stripped from the <script> tag
  • ensure switchToLanguage isn't readded on subsequent runs
  • made createPrinter return a tuple instead of an object (nicer that we dont have to name the printers twice)

additional notes:

  • it would be nice if the injected template code wasn't always appended on every run, though I'm not sure if there's an elegant way to prevent that atm so what we have now will have to do

Copy link
changeset-bot bot commented Oct 13, 2024

🦋 Changeset detected

Latest commit: d88f21b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
pkg-pr-new bot commented Oct 13, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/sveltejs/cli/sv@104

commit: d88f21b

Copy link
Member
@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

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

it would be nice if the injected template code wasn't always appended on every run, though I'm not sure if there's an elegant way to prevent that atm so what we have now will have to do

we could add all of our code inside a div with a special class name and check for that. Although im not sure it's worth the effort.

@AdrianGonz97
Copy link
Member Author

we could add all of our code inside a div with a special class name and check for that. Although im not sure it's worth the effort.

yea i don't think it is. it only applies to the demo, so I think it's fine in this case

@manuel3108
Copy link
Member

Added a changeset for the sake of trying to get a release to work!

@AdrianGonz97 AdrianGonz97 merged commit 198a120 into main Oct 13, 2024
5 checks passed
@AdrianGonz97 AdrianGonz97 deleted the chore/imrpove-paraglide branch October 13, 2024 16:46
@github-actions github-actions bot mentioned this pull request Oct 13, 2024
@manuel3108 manuel3108 mentioned this pull request Oct 13, 2024
24 tasks
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.

2 participants
0