-
Notifications
You must be signed in to change notification settings - Fork 441
RFC: Core Components
Approved by:
Former kickoff discussion: https://trello.com/c/UYp45jP5/29-create-a-set-of-core-view-components
Use View Components to create a set of core components to be reused across the project in order to standardize the implementation of similar objects.
A core component is meant to be a composition of elements that can be considered reusable for the same purpose in multiple circumstances, it doesn't matter the level of the internal complexity: it might be a single atomic element or a nested connection of multiples.
A View Component has all the properties a reusable component need to have:
- slots to pass custom content but keep it organized in the same scaffolding shape
- previews in order to have a static visual way of understanding what would be the outcome
- testing that might also be done on top of previews
- conditional rendering that makes it dynamically adaptable
- ..and more (for reference see the official guide https://viewcomponent.org/guide/ or the obs internal one too https://github.com/openSUSE/open-build-service/wiki/View-Components)
- consistency: all the same category elements aligned and shaped in the same way
- unified reusable implementation
- view components tests, previews and more built-in mechanisms
- prevent overlapping between different implementation of the same things on different occurrences
- in some case it might seem to be a re-implementation of utilities and helpers they already exist, especially if the core component is an atomic one, or it might feel like an HTML element wrapping implementation (helpers like
content_tag
, orlink_to
,button_tag
, etc already exist) - hard to move and reach to a state where core components are the only implementation in place
-
A basic button component introduced here https://github.com/openSUSE/open-build-service/pull/15030 and an enhancement available here https://github.com/openSUSE/open-build-service/pull/15073
-
A modal component: https://github.com/openSUSE/open-build-service/pull/15032
Here it is an example of what would mean to get rid of different ways of generating a button, and using the button core component instead: https://github.com/openSUSE/open-build-service/pull/15074/commits/b7cf2958db7ee011104b112a22787bcf94624cc4
- Development Environment Overview
- Development Environment Tips & Tricks
- Spec-Tips
- Code Style
- Rubocop
- Testing with VCR
- Authentication
- Authorization
- Autocomplete
- BS Requests
- Events
- ProjectLog
- Notifications
- Feature Toggles
- Build Results
- Attrib classes
- Flags
- The BackendPackage Cache
- Maintenance classes
- Cloud uploader
- Delayed Jobs
- Staging Workflow
- StatusHistory
- OBS API
- Owner Search
- Search
- Links
- Distributions
- Repository
- Data Migrations
- next_rails
- Ruby Update
- Rails Profiling
- Installing a local LDAP-server
- Remote Pairing Setup Guide
- Factory Dashboard
- osc
- Setup an OBS Development Environment on macOS
- Run OpenQA smoketest locally
- Responsive Guidelines
- Importing database dumps
- Problem Statement & Solution
- Kickoff New Stuff
- New Swagger API doc
- Documentation and Communication
- GitHub Actions
- How to Introduce Software Design Patterns
- Query Objects
- Services
- View Components
- RFC: Core Components
- RFC: Decorator Pattern
- RFC: Backend models