Comments (4)
I'm a big +1 on moving it out to it's own repo. I need some convincing on changing the build tooling unless there are specific problems they are causing. Perhaps split this issue in two, and go ahead and get w3console into it's own repo.
from w3ui.
ok @olizilla - I moved the proposal to use a separate repo to #561 so we can talk about that there. I'll make the case for Next.js below!
from w3ui.
I need some convincing on changing the build tooling unless there are specific problems they are causing
Makes sense! I think #417 is a good example of some of the problems we're running into with the current setup - in order to add new pages we had to hand-roll react-router-dom
in the top level app.tsx
. This means that we need to either roll our own routing logic that scans the filesystem OR be sure to add new routes every time we introduce a new page, and similarly introduces a need to understand the routing code to figure out where page rendering logic lives. Additionally:
- it means that it would be hard to get good support for code-splitting, since proper code-splitting needs to be router-aware and Vite (which would need to do the code splitting) does not know about
react-dom-router
. We could probably figure out how to configure it to do so, but I'd rather just go with the tried and true solution baked into Next.js. - it means we need to start using
react-router-dom
'sLink
implementation everywhere in order to avoid reloading the page when a user clicks a link, and imho the syntax and implementation of that is not as good as Next.js'sLink
- integration with React's new Suspense primitive would be much more difficult, which means our loading UI will likely be strictly worse (https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming)
- we'd need to roll our own localization support (https://nextjs.org/docs/app/building-your-application/routing/internationalization)
- we'd need to roll our own support for Layouts (new versions of Next.js have a very nice Layout system https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts)
Backing up a little, comparing Vite and Next.js is a little "apples and oranges" - Vite is a build and development tool, while Next.js is a full-featured application development framework (Vite doesn't even try to compare itself with Next.js, I think for this reason https://vitejs.dev/guide/comparisons.html) so the real question here is:
Should we use an application development framework for w3console or should we roll our own?
imho there's very little advantage to rolling our own, and a number of disadvantages. Next's documentation lays these out pretty well:
https://nextjs.org/docs/app/building-your-application/upgrading/from-vite
Slow pages loads and the lack of automatic code splitting are two of the biggest things, imho, but "Choose the data fetching strategy" is also pretty huge for a site that I expect will come to include marketing content - being able to configure caching and server-vs-client render on a page-by-page basis are, in my experience, extremely helpful when trying to get acceptable Core Web Vitals.
Stepping back again, I know what you are looking for is specific pain points - beyond the routing complexity in #417 there admittedly aren't many - I think this is mostly because we have not been actively developing w3console recently and it has until now been a very simple single-page-app. imho Vite + react-router-dom is simply not a good choice for anything that needs more than a couple single SPA-style pages, but the pain doesn't really show up until the app gets larger and you start trying to optimize Core Web Vitals.
Rather than thinking of this as "do we need to switch to Next.js?" I'm thinking of this more like "we're building a new app, what's the right approach?" and for a number of reasons - some listed above, some left out, and some just being "that's what my gut tells me" - I think Next.js is the right tool for the job.
Thoughts?
from w3ui.
this is done https://github.com/web3-storage/console
from w3ui.
Related Issues (20)
- useKeyring is puzzling me HOT 2
- Include ToS in deployed web apps HOT 2
- Links to docs and opening a GH ticket in deployed web apps
- Update ToS in README to updated link
- Include warnings for permanent and public data in deployed web apps HOT 1
- keyring-core KeyringContextState.account should be a DID<'mailto'> rather than just an email
- uploaded file in https://staging.console.web3.storage, clicked link to w3s.link, gets 504 timeout
- Warnings about public and permanent data
- pnpm install fails
- remove or fix vanilla JS examples HOT 1
- Sync keyring provider getProofs
- using the Authorization form with an email address with a + in it doesn't work
- Linter should enforce style in w3console HOT 3
- default when clicking on uploaded CID shouldn't take you away from console page
- fix: re-enable vanilla and vue playwright tests and codesandbox
- failed to register handleRegisterSubmit Authenticator.jsx:17 Caused by: Error: Voucher claim failed HOT 5
- proposal: move w3console to its own repository HOT 1
- Document new API and deprecate old HOT 2
- Tests not running on release please PRs?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from w3ui.