Skip to content
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

DISCUSSION - Rebuilding ionic-svelte #93

Open
Tommertom opened this issue Jan 7, 2024 · 8 comments
Open

DISCUSSION - Rebuilding ionic-svelte #93

Tommertom opened this issue Jan 7, 2024 · 8 comments

Comments

@Tommertom
Copy link
Owner

Tommertom commented Jan 7, 2024

Hey there,

Looking to rebuild ionic-svelte - I want to get rid of some of the blocking bugs with overlays, remove code that duplicates @ionic/core and make it easier to follow Svelte(Kit) and Ionic release updates.

I want to capture a few design principles for rebuilding ionic-svelte and looking to get feedback from the community:

  • we should follow the ionic documentation for components as close as possible
  • we wont support ionic cli commands
  • in case we cannot follow the ionic documentation we create a customer solution that we document via example code
  • we prefer helper functions over creating custom .svelte components (e.g. we don't want to ship Ion*.svelte) - e.g. [Question] How to implement router with IonTabs? #91 - where we like to ditch IonTabs and can simplify DX with a helper function
  • we pref additional div/etc elements over creating custom .svelte components (e.g IonTabs pushes ion-footer outside the viewport #81 - where we need to add div class='ion-page' to assure ion-footers are shown correctly.
  • we want to import as much as possible from @ionic/core - so we also do not re-export types and controllers from ionic-svelte
  • we will support SvelteKit and non-Kit projects
  • if we export functions we prefer JSDOC over Typescript
  • we will not rebuild and/or create strong dependencies on the kit router to achieve native transitions

Happy to hear your thoughts on these and other design principles and the consequences for the implemention of for instance:

  • dealing with nav stacks - Tabs and Subpages #86 - to remove IonTabs and support further navigation - posted by RingoRohe

Some issues I am not sure yet how to solve

Things I plan to remove/or do not return

  • PWA stuff - service worker config and API as per Vite plugin
  • No modalController and popoverControllers - these create all sorts of issues with CSS code inlines are recommended anyway

Ongoing rebuild with demo app posted on github - https://github.com/Tommertom/ionicsvelterebuild
Demo app posted on https://test-cf8eb.web.app/

@Tommertom Tommertom changed the title DISCUSSION - Rebuilding ionic-svelte - principles DISCUSSION - Rebuilding ionic-svelte Jan 7, 2024
@keev-studio
Copy link

Hi, sorry to say that but after recreating your Demo app I have strange behavior of the tabs, they just randomly appear and disappear. See the video

1705867773-videorecord-2024-1-21-21-9-33.1.mp4

@briznad
Copy link
Contributor

briznad commented Jan 22, 2024

Hi, sorry to say that but after recreating your Demo app I have strange behavior of the tabs, they just randomly appear and disappear. See the video

1705867773-videorecord-2024-1-21-21-9-33.1.mp4

@keev-studio could you share a link to your repo where you're experiencing this issue, and I can take a look?

@Tommertom
Copy link
Owner Author

@keev-studio - can you please continue this issue under #86 or a new one, so we have this issue focus on the possible rebuild of ionic-svelte?

@AlexRMU
Copy link

AlexRMU commented Mar 13, 2024

Perhaps it makes sense to use svelte 5 right away, so as not to migrate later?

@Tommertom
Copy link
Owner Author

Perhaps it makes sense to use svelte 5 right away, so as not to migrate later?

Yes-once stable & released

@ptmkenny
Copy link
Contributor

I'm new to Svelte and this project (currently evaluating migrating a React app to Svelte), and I'm curious about this point:

  • if we export functions we prefer JSDOC over Typescript

Why prefer JSDOC to Typescript? Ionic itself uses TypeScript, not JSDOC.

@Tommertom
Copy link
Owner Author

Tommertom commented Jul 30, 2024

Hi

Library authors for svelte might prefer jsdoc as there are many svelte devs who dont use typescript

If the package would be in ts then I would exclude them

Because most editors give intellisense using jsdoc, the experience wont be different to both ts and non ts developers

So unless you are building a package/library for the broader range developers this does not matter and if you like ts, please continue doing so

Fireship has a video on this I believe

Ps ionic source in Stencil is indeed with typescript but the bundle itself isnt. Typings are provided separately

@Tommertom
Copy link
Owner Author

Svelte 5 introduces function components instead of classes

Something that will break current lib

flekschas/svelte-simple-modal#113

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

No branches or pull requests

5 participants