-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
New 'Hello World' page #934
Conversation
…ions -. Applying it to the CLI as well
…s color needs to be dynamic based on the theme mode
Wow, cool! This PR if very much appreciated! My main question would be around the skeleton vs hello world app. I don't have a fully formed opinion on this yet. Some things to think about:
Maybe we should go with the fleshed out version and have a svelte-adder (or remover/modifier 😉 ) that remove the extra files Also, if you happen to want to do any more of this type of work you might be interested in #244 as well 😄 |
Hey @benmccann, I'm really excited to know that you appreciated it :) IMHO, I only applied the Oh, and definitely, I'll take a look at #244 and dedicate some time to it! 😉 |
Yeah, makes sense. It's probably a good idea to have both. The question in my mind would mostly be around how to accomplish it. Right now there's two copies of a lot of files like https://github.com/rafaelcamaram/kit/blob/camara/gh-90/packages/create-svelte/template-skeleton/README.md and we'd have to modify two copies of them everytime we want to make a change and I imagine they'd get out of sync and might become annoying to deal with I'd want the other maintainers to weigh in on these questions, but I personally might suggest the following:
Thanks again for all your help with this! |
… handled only by svelte-adders
…ry svg files and fixing small design issue
Hey @benmccann, I just applied all the suggestions you gave. Please, let me know if I misunderstood something or if there is something more to improve :)
|
…nsidering skeleton template
const ts_response = await prompts({ | ||
type: 'confirm', | ||
name: 'value', | ||
message: 'Use TypeScript in components?', | ||
initial: false | ||
}); | ||
await add_typescript(target, ts_response.value); | ||
|
||
const css_response = await prompts({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would have left that in it's really easy to setup, we don't even need to add much code modifications. Also, do we have any data how many people would choose what? I think people would opt for scss quite a bit just because many component libraries use it for their styling/theming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I see your point.. The only drawback I see is that we would need to maintain 3 different styling files (I believe that's why @benmccann suggested removing it) but i's not a big deal for me -- it'd be easy to revert.
@dummdidumm @benmccann How should I move forward with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We chatted about this part for a bit and it sounds like @Rich-Harris and @pngwn also vote to take out the CSS stuff
…rn and and scoping data-theme to :root
background-color: var(--accent-color); | ||
transform: rotate(45deg); | ||
} | ||
</style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd probably be nice to add a new line to the end of this file
@@ -0,0 +1,3 @@ | |||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> | |||
<path d="M13.0264 1.20543C10.2914 1.91848 8.27275 4.4053 8.27275 7.36365C8.27275 10.8782 11.1218 13.7273 14.6363 13.7273C17.5947 13.7273 20.0815 11.7086 20.7945 8.97365C20.9292 9.628 21 10.3058 21 11C21 16.5229 16.5229 21 11 21C5.47715 21 1 16.5229 1 11C1 5.47715 5.47715 1 11 1C11.6942 1 12.372 1.07075 13.0264 1.20543Z" stroke="#676778" stroke-width="2" stroke-linejoin="round"/> | |||
</svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd probably be nice to add a new line to the end of this file
<path d="M4.75 20.5C5.44035 20.5 6 19.9404 6 19.25C6 18.5597 5.44035 18 4.75 18C4.05964 18 3.5 18.5597 3.5 19.25C3.5 19.9404 4.05964 20.5 4.75 20.5Z" fill="white" fill-opacity="0.6"/> | ||
<path d="M1.75 13.25C2.44036 13.25 3 12.6904 3 12C3 11.3097 2.44036 10.75 1.75 10.75C1.05964 10.75 0.5 11.3097 0.5 12C0.5 12.6904 1.05964 13.25 1.75 13.25Z" fill="white" fill-opacity="0.6"/> | ||
<path d="M4.75 6C5.44035 6 6 5.44035 6 4.75C6 4.05964 5.44035 3.5 4.75 3.5C4.05964 3.5 3.5 4.05964 3.5 4.75C3.5 5.44035 4.05964 6 4.75 6Z" fill="white" fill-opacity="0.6"/> | ||
</svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd probably be nice to add a new line to the end of this file
*/ | ||
export default async function add_typescript(cwd, yes) { | ||
export default async function add_typescript(cwd, yes, is_skeleton_template) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a question about whether we could reverse this to start with the typescript template and make it remove_typescript
. we have svelte-preprocess
which should already offer the ability to strip out the typescript stuff and would make it so that we don't have to update this script at all when we change the template. using svelte-preprocess
might be a big change to include in this PR, but it might be a step towards that to at least reverse the logic even if still done manually
I think we should hold off on going further here until #989 or something similar is merged and rebuild upon that, else merge conflicts galore. |
Since we got several conflicts here, I thought it would be easier to create a new PR based on the new New PR related to the new 'Hello World' templates: #1007 |
This PR aims basically to add a new 'Hello World' page as it was requested by #90 (created by @Rich-Harris).
Figma File by @vedam
Tests
pnpm test
and lint the project withpnpm lint
CLI - Preview - (first step)
Default template - Preview
Skeleton template - Preview
Observation
I'm still performing my first baby steps with Svelte, so feel free to let me know if I can improve something 😛