-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use js frontend framework #67
Comments
@ubiquity/software-development @zugdev RFC |
The UIs should be single purpose and these frameworks add more work than save time for simple UIs. However I understand the concern for pay.ubq.fi because its the most mature UI we have. I think it makes more sense to consider a framework specifically for that repository, not for every repository just starting out with this template. |
To give my opinion, I surely love Next.js for how convenient, powerful, organized, speedy and all the ecosystem that Vercel built around. It can also produce static websites, and embeds SSR which would solve lots of our caching issues, and give instant rendering on the browser. Documentation is plentiful, all based on modern React, community is large, it's well maintained. Very easy to do network calls, invalidate, deploy, and has a very opinionated structure for the folders. I used it from small to large scale, and always found it easy to get used to. But of course it always comes down to personal preference, so this might be my frontend experience speaking. I know that @0x4007 opinion is always bare TypeScript, which is fine for a one page website, but I must say that when you want to have plenty of collaborators helping as @rndquu said it is really hard to enforce rules. Also, like it happened last time with pay.ubq.fi, it was extremely complicated to change the rewards page because there is no reusable components. We also still have plenty of caching issues with work.ubq.fi that a framework would solve effortlessly. Another advantage of a framework would be to reuse themes, components and pages across projects. |
I know I am not core team but I don't think TypeScript is the problem - let me add my opinion. The problem I've noticed with
Trust me when I say this is a problem I think a good addition to the template is having 2 files: |
By the way, I am available to refactor |
I think it makes more sense to move "mint gift card" related features and functions to a separate repo
This is basically react reimplementing with a single root component. Overall I see what you mean, perhaps it makes sense simply to properly structure https://github.com/ubiquity/ts-template, like:
And utilize a JS template engine https://github.com/janl/mustache.js. But all of this is already implemented in https://nextjs.org/ :) |
Im not against using a framework, I think it is a good idea, but not because it will make code perfect. |
I agree that a simple static page like landings can be made in pure JS/TS, but once you have dynamic pages like It's true that pay.ubq.fi has a bad foundation because when I had to implement minting card for ubuiquity dollars I had to untangle code, duplicate code, a lot of headaches in short. But even if I wanted to rebuild it with a good foundation I'd have to implement a basic framework to manage everything. Personally I've done most work in React, some Vue but no Angular so I would vote for Preact, although with React you get the advantage of using React libs like Wagmi which abstracts a lot of things that we manually had to develop like connecting to wallet, managing network changes, managing wallet changes, type-safe ABI access |
Of course not, someone who wants to make a mess will always find a way. But that would set a strong guardrail (e.g. in Next if you misplace / misname an error is yielded right away). The major issue I encountered when I tried to work in I'd also vote for something React based as it is the most popular, so with a higher chance to find devs with xp in it. The elephant in the room is that the FE should be redone. |
Can rebuild all websites in a framework very fast tbh. Also I'd love to know if we are in fact getting a framework before I write DOM for |
I’ve been considering writing occasional team memos to highlight org priorities and clarify my stance on certain decisions. We don’t have active partners using our system yet, which allows us to iterate quickly without worrying about backward compatibility, stability etc. My focus is on building tools and processes that maximize our development velocity in a sustainable way. On frameworks: they should only be used if they’re widely popular to attract more contributors. But right now, we’re in an active R&D phase, so maintaining flexibility is key. Frameworks reduce flexibility in exchange for maintainability, which makes sense for mature projects like pay.ubq.fi, but not for new initiatives. Instead, we should create almost like "disposable" UIs—one-offs with minimal boilerplate, each serving a specific purpose with its own repository. A single framework wouldn’t be optimal for every special-purpose tool.
Rather than enforcing a framework, we should break new responsibilities into separate repositories that deploy automatically to unique subdomains, linked for a seamless user experience. As our tools mature, we can introduce frameworks and testing.
These have been resolved after simplifying the data model to load devpool-issues.json.
This is challenging due to our ongoing R&D and the number of low-context contributors, but periodic refactors from trusted contributors (like you) would be useful. As a side note: in order to handle this in a more continuous, "UbiquityOS way": ubiquity-os/plugins-wishlist#33
Interesting idea. I’d like to see a demo implementation to provide feedback.
I agree. It doubled the complexity of the pay.ubq.fi codebase, so splitting it into card.ubq.fi is a good idea. In conclusion, the only codebase that might need a framework now is pay.ubq.fi, which is our most mature project. Historically, enforcing React in uad.ubq.fi slowed development significantly. For new tools, breaking off into dedicated repos is preferable to adopting a UI framework too early. |
This is right.
I will do that in |
This is the 4th or 5th time the topic is discussed. Right now we don't use any JS framework for our frontend applications. Although this approach is probably fine for small scale apps it doesn't stand against frontend apps with a large codebase.
Check https://github.com/ubiquity/pay.ubq.fi/tree/development/static for example, which already became kind of a mess because it's hard to distinguish separate pages, separate components, render methods, utils, etc... Not to mention that unit/snapshort/e2e testing is complicated in such codebase.
We need a JS framework with these features:
I've personally heard good reviews about:
Since I personally have more experience with react then, perhaps, https://preactjs.com/ worth a shot.
So as a part of this issue we should refactor https://github.com/ubiquity/ts-template to use a selected JS framework in a structured way:
The text was updated successfully, but these errors were encountered: