Skip to content

Commit

Permalink
Chore: Added Core to OpenSCD (#1363)
Browse files Browse the repository at this point in the history
* Initial commit

* chore: init open-wc component project

This project uses the open-wc.org recommendations and was generated
using their generator https://open-wc.org/docs/development/generator

* doc: add CONTRIBUTING.md

Resolves #31

Co-authored-by: Juan Munoz <[email protected]>

* feat(editing): open documents

* feat(editing): insert and remove nodes

* feat(editing): update elements' attributes

* refactor: rename open and edit events

* feat(editing): add editing user interface elements

* test(editing): fix attribute order sensitivity

* feat(plugging): load menu and editor plugins

* chore(github-action): webkit support

* feat(foundation): export cyrb64 hash function

* feat(demo): add remote open and save plugins

* feat(open-scd): pass editCount to editor and menu plugins

The property next now editCount is changed by open-scd on every change
of the XMLDocument. The property next is changed to editCount and passed
 to both menu and editor plugins to trigger UI updates.

* fix(plugging): import relative paths from origin

* fix(open-scd): hide menu plugin element container

* fix(open-scd): import locales from relative URL

* ci: add rollup bundle and deploy scripts

* Splitted up the render function of open-scd

* Added spread operator from @open-wc

* Update open-scd.ts

* Add the plugin to be rendered to pluginProperties()

* Linted open-scd.ts

* Fixed eslint

* Delete .gitignore

* Delete .idea directory

* Delete screenshots directory

* Added screenshots

* Fixed tests. Added idea folder to gitignore

* feat: export open-scd and mixin types

* chore: added release please

* chore: removed browser line

* chore(main): release 1.0.0

* Removed V1.0.0 from Changelog

* chore(main): release 1.1.0

* Changed version to 1.0.0 on Changelog

* Changed version to 1.0.0 on package-lock.json

* Changed version to 1.0.0 on package.json

* Added .npmignore

* Added build step in release-please

* Added css variables to map to appBar

* Removed unused files

* Fix: mdc-top-app-bar-fixed has link to --oscd-theme-app-bar-primary and --oscd-theme-primary

* chore(main): release 1.0.1

* Added interfaces to mixins for type delcarations

* Added doc to .gitignore, reverted screenshots

* Reverted .npmrc

* Chore: Added interfaces to mixins for typescript declaration files

* Create 0001-ADR-Theming.md

* Update and rename 0001-ADR-Theming.md to doc/0001-ADR-Theming.md

* Add files via upload

* Update 0001-ADR-Theming.md

Added naming section

* tier should be optional for theming variables

* Added example titles

* Updated title to Theming proposal

* Changed status to accepted

* Added atomic Design ADR

* Docs: Moved ADRs from `doc` into `docs` folder.
The `doc` folder was clashing with TypeDoc

* chore: workflows to add prs to the overview board

Signed-off-by: Juan Muñoz <[email protected]>

* Moved files from Open-scd-core into core package

* Fix: Moved correct files to core

* Fix: Fixed merge conflict

* Fix: Fixed merge conflicts

* Removed GH Actions from OpenSCD Core

* Reverted changed GH Actions

* Fix: Fix merge conflicts

* Fixed package-lock.json

---------

Signed-off-by: Juan Muñoz <[email protected]>
Co-authored-by: cad <[email protected]>
Co-authored-by: Christian Dinkel <[email protected]>
Co-authored-by: Juan Munoz <[email protected]>
Co-authored-by: Jakob Vogelsang <[email protected]>
Co-authored-by: Stef3st <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
7 people authored Nov 14, 2023
1 parent 2d602b2 commit 0c2a56a
Show file tree
Hide file tree
Showing 103 changed files with 26,660 additions and 16,597 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@
## npm
node_modules/
/npm-debug.log

## testing
/coverage/

# build
/locales.ts
/locales
/dist
/custom-elements.json
/.tsbuildinfo
/.rollup.cache

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If you don't have your own webserver but still want your own version of OpenSCD
This repository is a [↗ monorepo](https://en.wikipedia.org/wiki/Monorepo), made up of several packages.
To find out more about the development of each packages, such as the base distribution or the plugins, please refer to their respective READMEs:
- [open-scd](packages/open-scd/README.md): provides the base distribution available on [openscd.github.io](https://openscd.github.io)
- [core](packages/core/README.md): provides the agreed api of OpenSCD Core

## Contributing

Expand Down
58 changes: 58 additions & 0 deletions docs/0001-ADR-Theming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Theming proposal for Open-SCD

Date: 2023-05-16

## Status

Accepted

## Context
If we want a themable application where plugin authors can rely on a global style, we should make use of css variables. We can also make use of [Design Tokens](https://spectrum.adobe.com/page/design-tokens/).
With design tokens, we can generate css variables.

We can then override the Material css variables, so all the material components (mdc/mwc) will have the same look.

![Proposal](./theming-proposal.png)

### Background
Related links:
- [Adobe Design tokens](https://spectrum.adobe.com/page/design-tokens/)
- [Design Tokens for dummies](https://uxdesign.cc/design-tokens-for-dummies-8acebf010d71)
- [Material Design Tokens](https://m3.material.io/foundations/design-tokens)

### Naming
We should come to a global agreement of naming variables.
My suggestion would be to follow the following standard:

<pre>--{namespace}-[{tier}]-[{prefix}]-{name}-[{suffix}]-[{scale}]</pre>

Implementation of this standard:

#### Example 1
<pre>--oscd-color-primary: #548ea6;</pre>

Namespace: <pre>--<b>oscd</b>-color-primary</pre>
Tier: -<br/>
prefix: -<br/>
name: <pre>--oscd-<b>color</b>-primary</pre>
suffix: <pre>--oscd-color-<b>primary</b></pre>
scale: -<br/>

#### Example 2
<pre>--oscd-dark-color-primary-100: #548ea6;</pre>

Namespace: <pre>--<b>oscd</b>-dark-color-primary-100</pre>
Tier: <pre>--oscd-<b>dark</b>-color-primary-100</pre>
prefix: -<br/>
name: <pre>--oscd-dark-<b>color</b>-primary-100</pre>
suffix: <pre>--oscd-dark-color-<b>primary</b>-100</pre>
scale: <pre>--oscd-dark-color-primary-<b>100</b></pre>

## Decision

T.B.D.


## Consequences
This decision will mean that the current OSCD components will need some extra
css styling to link OSCD css variables to internal styles (or mwc-variables).
39 changes: 39 additions & 0 deletions docs/0002-ADR-Atomic-Design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Atomic Design proposal for Open-SCD

Date: 2023-05-24

## Status

Open

## Context
If we want to build robust reusable components, we should make use of the Atomic Design principal.
This design principal consists of multiple levels of components:
* Atoms
* Molecules
* Organisms
* Templates
* Page

A molecule is a group of atoms together. An organism is a group of molecules together. etc. etc.

#### Example

We have a textfield component (Atom) called @openscd/oscd-textfield.
We also have a button component (Atom) @openscd/oscd-button.

We now can create a search component (Molecule) called @openscd/oscd-search.


### Background
Related links:
- [Atomic Web Design](https://bradfrost.com/blog/post/atomic-web-design/)

## Decision
T.B.D.


## Consequences
This decision will mean that the current OSCD components might need some extra
work to split up components by type (Atoms/Molecules/Organisms).
Also, we might introduce more overhead if we split all the atoms and molecules up by repository.
Binary file added docs/theming-proposal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0c2a56a

Please sign in to comment.