-
Notifications
You must be signed in to change notification settings - Fork 2
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
UI Guidelines&Front-end refactoring #367
Comments
Since the previous design drafts were based on the existing online pages, some inconsistent styles were also reflected in the design drafts to meet the rapid iteration requirements. Now, if we need to establish design specifications, it might be better to redesign the browser with a new style. The time required for adjusting and redesigning according to the specifications is approximately the same because there are quite a few details that need to be standardized if we want to make changes to the existing online pages. @Keith-CY what are your thoughts? Do we currently have a need to redesign the CKB explorer? |
We do not need redesign all explorer, just refine the design system from existing design. |
Redesigning CKB Explorer may take a lot of time, not only because of the design work itself, but also due to the agreement from the foundation. But we can start the design spec first, without regarding any specific projects. The design spec can be used to direct projects other than Neuron and CKB Explorer. And once we have a fully polished design spec, we will propose a new design of Neuron and CKB Explorer to the foundation |
Sure, we can unify the details at this stage |
At first, color, the preliminary things for a design. Please ensure all colors can be found in the palette. @Kirl70 |
The design guidelines will be developed after the official website design is completed. |
CKB Explorer Design Guidelines: |
@Sven-TBD Please add chart scaling logic and other product solutions that need to be optimized. @Keith-CY @WhiteMinds Please add a list of front-end code refactoring and options. @PainterPuppets @zhangyouxin @Daryl-L If there are other CKB Explorer front-ends that need to be optimized, please add them. |
Firstly, I would like to list the main goals of this refactoring: to improve the maintainability and scalability of the code, which will pave the way for future development. To achieve this goal, we should make the existing code more standardized and cohesive (easy to read and easy to maintain). Here are some of my proposals:
There are a few other ideas in the works. |
I wonder if it's necessary to keep If so, |
We can indeed refactor and remove some of the global state, but there will still inevitably be some states that are truly global. If they all use Context provided by each component, it may be somewhat cumbersome, so it is still recommended to find a simpler way to implement components or services that provide global state externally. |
The passage above mainly makes some practical suggestions. In addition, I also hope the project can have some changes in development philosophy. I think the current project lacks some core point sthat developers hoping to understand the project can use to quickly grasp it. Instead, various logics are mixed and scattered, making it hard to comprehend. This makes it difficult for people taking over the team or people in the community wanting to participate to get started. So I hope to establish a core model layer, separating the model, external services, and views. Some reference materials:
Even if we don't do this now, we can first learn about it. |
We can have a list of global states first since I merely use global states in godwoken blockchain explorer |
After the view and data enter a decent decoupled state, we can consider introducing storybook. This will help us implement each component and its responsiveness more independently and better, and help promote some CSS development strategies, such as not allowing the component container itself to contain position, size, scaling and other styles, but having them set by the code using the component and only allowing the setting of such information. |
The The The 3 variables in |
I've checked export interface App {
toast: ToastMessage | null
appErrors: [
{ type: 'Network'; message: string[] },
{ type: 'ChainAlert'; message: string[] },
{ type: 'Maintenance'; message: string[] },
]
tipBlockNumber: number
language: 'en' | 'zh'
primaryColor: string
secondaryColor: string
chartColor: {
...
}
} So the Among them,
Then the export interface Components {
mobileMenuVisible: boolean
headerSearchBarVisible: boolean
maintenanceAlertVisible: boolean
} By reading the code I found they are just used for responsible layout, and can be avoided by using css. |
It looks like it's possible to try to remove all of them as much as possible during the refactoring effort. |
For
|
We may split the tasks if there is no more feedback from @WhiteMinds @zhangyouxin @PainterPuppets @Daryl-L |
@WhiteMinds How is it going with these issues of refactor? |
I didn't have time to work on this task last week, and it's unlikely that I'll have time this week either. This could potentially be a long-term and large task. |
Multiple implementations of browser-style codes exist currently. In order to maintain clean frontend code and consistent page styles, a unified UI guideline is needed to specify the interaction logic and layout for each component.
UI design
Front-end modification
The text was updated successfully, but these errors were encountered: