Skip to content
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

chore: move component definitions #3638

Open
wants to merge 6 commits into
base: master
from

Conversation

@janechu
Copy link
Member

janechu commented Aug 6, 2020

Description

This change moves the component definitions from the site-utilities folder to @microsoft/fast-components but not as a direct export.

Motivation & context

This is part of the work to add Open UI schemas as exports. These will be combined with the additional definitions as dictated by their JSON schema as the implementations property, for more details see #3636

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Adding or modifying component(s) in @microsoft/fast-components checklist

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.
Copy link
Contributor

EisenbergEffect left a comment

@janechu Can you comment on these definitions vs the Open UI definitions? There's a lot of metadata going around...

@janechu
Copy link
Member Author

janechu commented Aug 7, 2020

@EisenbergEffect Yep, so these "component definitions" are the ones that map to VS code web component definitions. They will become part of the Open UI definition, as I'm adding a new property "implementations" to their JSON schema. I imagine that a more fleshed out definition should look something like this:

{
    "name": "Button",
    "uri": "https://fast.design/docs/components/button",
    "implementations": [{
        "type": "web-component",
        "implementation": {
            "version": 1,
            "tags": [{
                "name": "fast-button",
                "description": "The FAST button element",
                "attributes": [{
                    "name": "appearance",
                    "description": "The appearance attribute",
                    "type": "string",
                    "values": [{
                        "name": "accent"
                    }, {
                        "name": "lightweight"
                    }, {
                        "name": "neutral"
                    }, {
                        "name": "outline"
                    }, {
                        "name": "stealth"
                    }],
                    "default": "neutral",
                    "required": false
                }, {
                    "name": "autofocus",
                    "description": "The autofocus attribute",
                    "type": "boolean",
                    "default": false,
                    "required": false
                }, {
                    "name": "disabled",
                    "description": "The disabled attribute",
                    "type": "boolean",
                    "required": false
                }, {
                    "name": "form",
                    "description": "The form attribute",
                    "type": "string",
                    "required": false
                }, {
                    "name": "formaction",
                    "description": "The formaction attribute",
                    "type": "string",
                    "required": false
                }, {
                    "name": "formenctype",
                    "description": "The formenctype attribute",
                    "type": "string",
                    "required": false
                }, {
                    "name": "formmethod",
                    "description": "The formmethod attribute",
                    "type": "string",
                    "required": false
                }, {
                    "name": "formnovalidate",
                    "description": "The formnovalidate attribute",
                    "type": "boolean",
                    "required": false
                }, {
                    "name": "formtarget",
                    "description": "The formtarget attribute",
                    "type": "string",
                    "values": [{
                        "name": "_self"
                    }, {
                        "name": "_blank"
                    }, {
                        "name": "_parent"
                    }, {
                        "name": "_top"
                    }],
                    "required": false
                }, {
                    "name": "name",
                    "description": "The name attribute",
                    "type": "string",
                    "required": false
                }, {
                    "name": "type",
                    "description": "The type attribute",
                    "type": "string",
                    "required": false
                }, {
                    "name": "value",
                    "description": "The value attribute",
                    "type": "string",
                    "required": false
                }],
                "slots": [{
                    "name": "",
                    "description": "The default slot"
                }, {
                    "name": "start",
                    "description": "The start slot"
                }, {
                    "name": "end",
                    "description": "The end slot"
                }]
            }]
        }
    }]
}
awentzel and others added 4 commits Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.