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

Decouple Skeleton from SvelteKit #68

Closed
endigo9740 opened this issue Aug 9, 2022 · 10 comments
Closed

Decouple Skeleton from SvelteKit #68

endigo9740 opened this issue Aug 9, 2022 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented Aug 9, 2022

Expand Skeleton's support and instruction for any framework where Svelte and Tailwind can be used. Including, but not limited to:

@endigo9740 endigo9740 added bug Something isn't working good first issue Good for newcomers labels Aug 9, 2022
@endigo9740 endigo9740 changed the title Test running Skeleton outside of SvelteKit Decouple Skeleton from SvelteKit Aug 10, 2022
@endigo9740 endigo9740 added the help wanted Extra attention is needed label Aug 10, 2022
@niktek
Copy link
Contributor

niktek commented Aug 10, 2022

New Svelte project with TS, added Skeleton and commented out the exports from within node_modules/.../index.js, these are the ones that error out:

export { default as CodeBlock } from "./CodeBlock/CodeBlock.svelte"; // fails to resolve highlight.js
export { default as LightSwitch } from "./LightSwitch/LightSwitch.svelte"; // refers to $app/env for browser
export { default as Menu } from "./Menu/Menu.svelte"; //refers to $app/stores

@endigo9740
Copy link
Contributor Author

endigo9740 commented Aug 10, 2022

Ok, not too bad. Highlight.js is a required dependency for CodeBlocks. Follow the instruction on the doc to resolve that:
https://skeleton.brainandbonesllc.com/utilities/codeblocks

LightSwitch uses the following to determine if the app is loaded in the browser, a lifecycle hook essentially:
import { browser } from "$app/env";

Switching to a Svelte supported lifecycle hook may be enough to resolve that. Something like onMount:
https://svelte.dev/tutorial/onmount

That just leaves the menu issue mentioned in the original post. Perhaps we could use an onDestory here:
https://svelte.dev/tutorial/ondestroy

This seems reasonable. May require a bit of testing but I think we can make it happen!

@endigo9740 endigo9740 added enhancement New feature or request and removed help wanted Extra attention is needed good first issue Good for newcomers bug Something isn't working labels Aug 11, 2022
@skeletonlabs skeletonlabs deleted a comment from JensPfeifle Aug 13, 2022
@endigo9740
Copy link
Contributor Author

@JensPfeifle has provided a great PR to help with the first half of this ticket.

#82

This prunes the SvelteKit-specific features from either component per the suggestions above. However, I'll delay the merge until we can also document and provide instructions for how to install and setup Skeleton for other tools like Vite, Astro, etc.

The partial (but probably incomplete) list of those is in the original post above. I welcome anyone's instructions for documenting the process for each of these tools. Post them here and I'll find a means to merge it all together and update the homepage when ready.

@endigo9740
Copy link
Contributor Author

endigo9740 commented Aug 14, 2022

Track progress on Vite/Svelte instruction here:
#83

@endigo9740
Copy link
Contributor Author

endigo9740 commented Aug 14, 2022

FYI: #86

CodeBlock will be disabled from the next release until further notice. We'll revisit a different way to implement this and reintroduce in a future update.

See also: #82

This will ensure issues with the Menu and LightSwitch no longer affect Svelte apps that do not use SvelteKit.

@endigo9740
Copy link
Contributor Author

Documentation for Astro is ready, per: #93

@endigo9740
Copy link
Contributor Author

endigo9740 commented Aug 17, 2022

Per the original post, #83 and #93 have been closed as these changes have been merged from Dev.

We're still needing proper QA testing for the new updates to the docs. This covers:

  • Homepage - mainly "Getting Started" install instructions (each tab)
  • Guide sections (Tailwind, Themes, Styles, etc)
  • Newly introduce "Astro" guide section

Areas of focus will be the text copy messaging (it's it clear and concise), plus spelling/grammar/etc.

@endigo9740 endigo9740 pinned this issue Aug 17, 2022
@endigo9740 endigo9740 added the help wanted Extra attention is needed label Aug 17, 2022
@endigo9740 endigo9740 added the ready to test Ready to be tested for quality assurance. label Aug 18, 2022
@endigo9740 endigo9740 unpinned this issue Aug 27, 2022
@bkcsfi
Copy link

bkcsfi commented Aug 29, 2022

Hi,

Sveltekit just changed $app/env to $app/environment, this broke my app because LightSwitch.svelte version 0.0.1 refers to $app/env

please disregard, upgrading to 0.32.19 fixed this. thanks

@endigo9740
Copy link
Contributor Author

Yeah, the LightSwitch underwent a fairly large change in 0.32.19 that would correct this. Sorry for the confusion @bkcsfi

@endigo9740 endigo9740 removed the ready to test Ready to be tested for quality assurance. label Aug 31, 2022
@endigo9740
Copy link
Contributor Author

I'm feeling pretty confident about the three primary frameworks we support right now, so I'm going to go ahead and close this issue. If requests come in for Routify or similar we can always generate new tickets in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants