withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.33k stars 2.45k forks source link

🏆 DX WEEK #4541

Closed FredKSchott closed 2 years ago

FredKSchott commented 2 years ago

Action Items: Day 1 (Brynn Stream)

https://www.twitch.tv/videos/1575481405

Action Items: Day 2 (Dax Stream)

https://www.youtube.com/watch?v=cmb4zVTQ5ZM

Action Items: Day 3 (YuriCodeBot Stream)

Action Items: Day 4 ()

Action Items: Starter Template Audit

aFuzzyBear commented 2 years ago

Tailwind integration has been updated : gitpod-io/gitpod#4543

Jutanium commented 2 years ago

Quick starter template action items: gitpod-io/gitpod#4544

FredKSchott commented 2 years ago

Update: I added a few more unchecked boxes from an old examples audit to this list. FYI they may be out of date and can be closed / checked off by just confirming!

Jutanium commented 2 years ago

@FredKSchott the only template that still uses sass is the portfolio template. But it also has another problem: It uses Preact for components that could be made using .astro!

Should I:

  1. Just migrate sass to CSS for this PR
  2. Both remove sass and Preact for this PR
  3. Leave it alone (as there may have been talk of revising this template from the ground up?)
FredKSchott commented 2 years ago

1 & 2 both sound good to me! As a reviewer, these should be okay to combine into a single PR so no issue there from me.

victorkane commented 2 years ago

astro.new When I click on Open in gitpod button for any example, instead of a cool online instance experience and then some (more like IDE than Stackblitz and CodeSandbox) what gets put in the window is the document root of the repo and example fails to run.

Loading example project: with-tailwindcss

> @example/with-tailwindcss@0.0.1 start /workspace/astro/examples/with-tailwindcss
> astro dev

sh: 1: astro: not found
 ELIFECYCLE  Command failed.
gitpod /workspace/astro (latest) $ pwd
/workspace/astro

I can then cd to appropriate directory (not exactly a friendly experience for newbie) and do npm i manually, but that fails.

So, with astro.new for me at least gitpod is unusable. Why is this?

sarah11918 commented 2 years ago

astro.new When I click on Open in gitpod button for any example, instead of a cool online instance experience and then some (more like IDE than Stackblitz and CodeSandbox) what gets put in the window is the document root of the repo and example fails to run.

Ooh, this shouldn't happen @victorkane! There was an issue, but we recently fixed it. I wonder whether something else changed in Astro to cause this.

One problem we have in general is that Gitpod right now can only open the entire monorepo. So, we worked with them to create a script that would cd you automatically to one particular starter template's root, and then run that starter only. BUT, even though we could do that, we can't stop the file tree from showing the entire monorepo. (We could at least open to the root of a starter, but you still see ALL of withastro/astro in Gitpod. So, that's a bit annoying, but we were able to get a starter to run.)

This is a very recent break (again) and I'll look into it with Gitpod!

EDITED TO ADD: OK, I do get the cd behaviour I'm expecting into the index page of the starter I clicked on! But the error message I'm seeing is for the pnpm install part of the script:

image

I'm going to ask @shaal if he has advice on this! Previous PR from a month ago that fixed this same problem: https://github.com/withastro/astro/pull/4120

victorkane commented 2 years ago

I'm going to ask @shaal if he has advice on this!

Super cool! Not a problem for me, individually, I'm simply trying to reflect a question of DX. I think that part of the problem is that while the noble goal of Astro being a fifth dimension that permeates "all the things", as we spread out from a basic SSG tool with a fantastic Astro component JSX-like experience, to, I can then import UI frameworks, to, I can use Astro for anything, there is a consequent infinite expansion into situations that need e2e testing (mentioned in the chat on Day 2) in many, many, many situations as devs bring enormous expectations... why can't I use vue.use in my vue component setup (when one thing is to add in a vue component here, a preact component there, and another is to suppose that Astro must have all the functionality of Nuxt, and Astro must have all the functionality of Next for React squad)... this expands geometrically and places unreasonable pressures on the Astro dev community.

Take Tailwind, for example... hey Tailwind just came out with groovy (sorry) full-scale site templates... they all work with Next.js ... hey why don't they work with Astro??? hey, I paid two hundred bucks for Tailwind UI and they have examples in their extra-special components for React, Vue and HTML... how come they don't work with Astro??? They work with Next.js and Nuxt.js because they were designed with all that cruft in mind for a cruft-addicted and cruft-dependent mindset. Astro is determined to move away from that cruft-dependent all things to all peeps mindset, and say, by default, "NO CRUFT".

So, DX Week in my opinion should be a huge shout out to lower expectations to be able to, or even want to, meet head on with the cruft-dependency (it's the same thing as the "rockstar coder" grotesque). DX week should be a huge warning to avoid complexity explosion.

As Gramsci explains from behind prison bars in a pre-WWII context: the main thing is to pursue a war of gaining solid (sorry) ground positions, and to avoid at all costs an ultra-left, right, up, down, balloon guerrilla war of being in constant maneuver mode, and jumping in here and jumping in there...

So the call out would be to insist on people coming to Astro, to understand the problem we're trying to solve: cruft-dependency, complexity payload, and the rockstar culture needed to supposedly deal with it... we believe in starting out light and flying freely in the cosmos... 80-20... 80% of even huge corporate website needs are marketing landing pages and content first projects... we start out with a rock-solid experience there... and can we do extra SPA on a particular page if needed? yes! spin up these examples and check it out! Can we do SSR using a node.js adapter on your digital ocean weekend server? yes! Does it work on Vercel? yes! Does it work on Netflify? yes, again thanks to hard work, in just a few weeks. Cool. Does SSR work on AWS? hmmmmm Hopefully the guys from the silent movie yesterday will presently be gifting us with a PR... if not, guess it will have to wait...

Is that a failure? No! Astro has come sooooo far in just a few weeks... Let's gain and hold the ground we're gaining, and relax a bit... Let's plan the e2e tests we all want (hopefully automated) so that we first see a decrease in leaks in the spaceship, then we move successively on to more and more scenarios, testing as we go. That's the valuable lesson this week I think.

shaal commented 2 years ago

Hi @victorkane 👋 I think I remember you from the Drupal community :)

@sarah11918 I'm looking into it. pnpm version should be something that gets updated when the custom docker image gets rebuilt, for some reason it doesn't get a new version. I'll keep you updated

shaal commented 2 years ago

I created an issue in Gitpod issue queue - https://github.com/gitpod-io/workspace-images/issues/914 I have a workaround in the meantime (PR coming soon)

shaal commented 2 years ago

@sarah11918 PR for temporary workaround is ready - https://github.com/withastro/astro/pull/4571

shaal commented 2 years ago

@natemoo-re @sarah11918 PR #4571 is merged to main, but I noticed https://astro.new/ opens workspaces that are in latest branch, which is failing because the changes in this PR are not in that branch.

natemoo-re commented 2 years ago

Thanks @shaal! I am tempted to cherry-pick this onto latest, but this should be fixed automatically when we do the next release.

FredKSchott commented 2 years ago

Closing, thanks everyone for participating in DX Week! Everything not yet checked has still been migrated to items on our core issue tracker.