Skip to content

chore: improve paraglide#104

Merged
AdrianGonz97 merged 6 commits into
mainfrom
chore/imrpove-paraglide
Oct 13, 2024
Merged

chore: improve paraglide#104
AdrianGonz97 merged 6 commits into
mainfrom
chore/imrpove-paraglide

Conversation

@AdrianGonz97
Copy link
Copy Markdown
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

@changeset-bot
Copy link
Copy Markdown

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

@pkg-pr-new
Copy link
Copy Markdown

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
Copy Markdown
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.

Comment thread packages/adders/paraglide/index.ts
@AdrianGonz97
Copy link
Copy Markdown
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
Copy Markdown
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
@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