Comments (3)
I dug into this a bit - it turns out that turning on our standard linter (eg, tsc --build && eslint '**/*.{js,jsx,ts,tsx}'
) turns up a LOT of issues, especially the TypeScript compilation phase.
Many of the issues are easy to fix automatically, but many of them look like they are fairly tricky Preact-related typing issues. While we could invest time into fixing this, it doesn't seem especially "center of plate" for our team right now, especially since I'm already interested in moving us over to a more full-featured framework (see #419).
Given this, I'd like to propose we solve this one of two ways:
-
Ditch
preact
and "rebase" w3console on top of the Vitereact-ts
starter template which has a linter setup by default that works well with Vite (the preact template, by contrast, has no linter configured): https://stackblitz.com/edit/vitejs-vite-hex6t4?file=index.html&terminal=dev -
Ditch Vite entirely and move to Next.js - I think this is the path of least resistance right now and wouldn't be too much of a lift - we'd be able to delete the routing logic that replicates default Next.js routing, so it should make things simpler.
@alanshaw @olizilla @Gozala thoughts?
from w3ui.
I have no strong feeling on any of this. I would however propose another (perhaps) controversial solution to the problem. What if we just use prettier and and call it a day, it will address most issues and provide consistency without been nit picky on things that I personally hardly ever find useful.
We could even setup https://github.com/marketplace/actions/prettier-action to just automate reformatting at PR level
from w3ui.
Ah so we actually were using prettier, but it didn't play nicely with eslint so I removed it:
The other issue is that one of the main problems here is that tsc --build
is the part that's failing in w3console and using prettier wouldn't do anything to fix that - we need to either debug and fix (what appear to be) some fairly thorny type incompatibilities between React and Preact or just move w3console to React. Given that it seems like w3console is trending toward being the main UI we'll deploy on top of w3up, I'm more inclined to just move it to its own project and use Next.js rather than Vite - should mostly be a matter of copying src files into a new project because I've tried to build it in line with Next.js's major architectural decisions. Next.js has a more coherent/well supported type checking and linting story so this problem would mostly disappear with that move.
All that being said I think this is probably a decision we should make after we have a larger conversation about how we want to roll w3up out to web3.storage and nft.storage users because the "right" move is going to be heavily dependent on our plans for that.
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
- proposal: use Next.js for w3console HOT 4
- 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
- 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.