090ae5df49
* v2.1.46 * Update pro version to 2.1.46 * v2.2.0 * Update pro version to 2.2.0 * Fix for budibase plugin skeleton, which utilises the old import style. * Fix side nav styles * v2.2.1 * Update pro version to 2.2.1 * using dist folder to allow importing constants for openAPI specs * v2.2.2 * Update pro version to 2.2.2 * Fix for user enrichment call (updating to @budibase/nano fork) (#9038) * Fix for #9029 - this should fix the issue users have been experiencing with user enrichment calls in apps, essentially it utilises a fork of the nano library we use to interact with CouchDB, which has been updated to use a POST request rather than a GET request as it supports a larger set of data being sent as query parameters. * Incrementing Nano version to attempt to fix yarn registry issues. * v2.2.3 * Update pro version to 2.2.3 * Fix SQL table `_id` filtering (#9030) * Re-add support for filtering on _id using external SQL tables and fix filter key prefixes not working with _id field * Remove like operator from internal tables and only allow basic operators on SQL table _id column * Update data section filtering to respect new rules * Update automation section filtering to respect new rules * Update dynamic filter component to respect new rules Co-authored-by: Martin McKeaveney <martin@budibase.com> Co-authored-by: Budibase Release Bot <> Co-authored-by: mike12345567 <me@michaeldrury.co.uk> Co-authored-by: Martin McKeaveney <martinmckeaveney@gmail.com> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
LICENSE | ||
README.md | ||
package.json | ||
rollup.config.js | ||
yarn.lock |
README.md
Budibase bbui
A package that handles all common components across the Budibase organisation. You can find the current live version Here.
Install
- Clone
npm install
npm run svench
(Note: yarn won't work!)
Example workflow to create a component
- Create a file:
Headline.svelte
- Create a Svench file:
Headline.svench
- Build component and add variants to the Svench file.
- Once done, re-export the file in
src/index.js
. - Publish, update the package in the main project and profit.
Guidelines
Making components
- Think about re-usability
- Use the css custom properties (variables) that are in the css stylesheet. This makes it easy to tweak things later down the line.
- Opt to forward events (
<button on:click>
for example) rather than using callbacks. - Avoid adding margins to the outermost container of the component.
Using components and the styleguide
- Get familiar with the different props that exist on the component. If something vital is missing, make a PR and add it.
- Take advantage of the css custom properties in the stylesheet and avoid writing hard-coded values.
- Since there is no margin on the components, think about the structure of the DOM and how to achieve correct spacing, etc. This can be done using
css grid
+grid gap
or with a container div where you specify a padding or margin. The best solution depends on the circumstance.
TODO
- Figure out a good documentation situation
- Add testing suite (E2E using Playwright?)
Other
The project uses Svench. It is somewhat akin to Storybook but a lot less bloated and much easier to setup. It also supports HMR for quick development.