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

Webpack5 addons status #91

Merged
merged 17 commits into from
Feb 25, 2022
Merged

Webpack5 addons status #91

merged 17 commits into from
Feb 25, 2022

Conversation

thadk
Copy link
Contributor

@thadk thadk commented Feb 24, 2022

Stacked on #89 and rebased on #90

Just a proof of concept for addon forms at this point, will refine later in the day after we talk about it.

@thadk thadk changed the base branch from master to staging February 25, 2022 14:14
@thadk
Copy link
Contributor Author

thadk commented Feb 25, 2022

Today's progress:

  • Top addon has a JSON-Schema parameter set in Django but documentcloud django doesn't know about how to read that yet so fails to find "name" in the addon parameters itself and isn't prepared for name to come in as a result of valid json-schema data.
  • Bottom addon has the original parameter set in Django. If you click the "simple" form, and submit it, everything seems to work. Worth trying on Staging, though I didn't have time to backport the things to webpack 4 yet.
  • Make dispatch Button gray out when there is invalid input as it did before. Right now it does respond when you click it without filling a last name on the first addon.

jsonschema

Top addon JSON-schema parameter:

{"type": "object", "title": "A registration form", "required": ["name", "lastName"], "properties": {"age": {"type": "integer", "title": "Age"}, "bio": {"type": "string", "title": "Bio"}, "name": {"type": "string", "title": "First name", "$svelte": {"field": {"props": {"autofocus": true}}}, "default": "Chuck"}, "random": {"type": "number", "title": "Random number"}, "lastName": {"type": "string", "title": "Last name"}, "password": {"type": "string", "title": "Password", "$svelte": {"field": {"props": {"type": "password"}}}, "minLength": 3}, "telephone": {"type": "string", "title": "Telephone", "minLength": 10}}, "description": "A simple form example."}

Same parameter for top addon prettified:

{
    "type": "object",
    "title": "A registration form",
    "required": [
        "name",
        "lastName"
    ],
    "properties": {
        "age": {
            "type": "integer",
            "title": "Age"
        },
        "bio": {
            "type": "string",
            "title": "Bio"
        },
        "name": {
            "type": "string",
            "title": "First name",
            "$svelte": {
                "field": {
                    "props": {
                        "autofocus": true
                    }
                }
            },
            "default": "Chuck"
        },
        "random": {
            "type": "number",
            "title": "Random number"
        },
        "lastName": {
            "type": "string",
            "title": "Last name"
        },
        "password": {
            "type": "string",
            "title": "Password",
            "$svelte": {
                "field": {
                    "props": {
                        "type": "password"
                    }
                }
            },
            "minLength": 3
        },
        "telephone": {
            "type": "string",
            "title": "Telephone",
            "minLength": 10
        }
    },
    "description": "A simple form example."
}

@mitchelljkotler mitchelljkotler merged commit c1e5427 into staging Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants