digitalinteraction / deconf-ui-toolkit

A library for running decentralised virtual conferences
https://ui.openlab.dev
0 stars 0 forks source link

deconf-ui-toolkit

A UI Library for building decentralised conference platforms. Designed to provide a central homepage for virtual events happening on lots of other services and platforms like YouTube, Zoom, Vimeo or Twitch.

Deconf Plugin

Clients must implement a plugin to provide logic to components. It should implement DeconfPlugin and be mounted onto Vue.prototype.$deconf You could implement it like this:

import _Vue from 'vue';
import { DeconfPlugin } from '@openlab/deconf-ui-toolkit';

class BespokeDeconfPlugin implements DeconfPlugin {
  static install(Vue: typeof _Vue) {
    Vue.prototype.$deconf = new BespokeDeconfPlugin();
  }

  // Then implement DeconfPlugin methods
}

Component dependency viewer

There is a script to generate a HTML report of the components and their dependencies. It works by parsing the special comments at the top of each component files and parsing the components { ... } section of the default export.

# cd to/this/directory

# Generate a HTML report of each component and i18n, icons, sass variables and child components
node build/dependency-page.mjs > dependencies.html
open dependencies.html

# Generate JSON output
node build/dependency-page.mjs --json > output.json

Contents

Sass Styles

It should export a sass file which you can customise the variables of like:

$primary: rebeccapurple;
$secondary: green;
$family-sans-serif: Helvetica, Avenir;
// etc

@import '~@openlab/deconf-ui-toolkit/toolkit.scss';

I18n

You provide your own I18n module when importing the toolkit which has these strings set (they are all namespaced under deconf):

You can skip strings for sections you aren't using

key

WIP, for full keys used see .storybook/locale.json

General

Each component to use has a doc comment like this in it. It lets you know what i18n and FontAwesome icons are required, along with what sass variables can be customized.

//
// i18n
// - n/a
//
// icons
// - n/a
//
// sass
// - n/a
//

Routes

The routes that need to be implemented are defined by Routes in src/lib/constants.ts

Scss Variables

Some components expose variables to control how they are styled and coloured. See the vue component in question for more.

All of bulma's variables are also used, in particular:

WIP


components are writen in a specific way:


how does the bundler work?

other notes