Giter VIP home page Giter VIP logo

xgovformbuilder / digital-form-builder Goto Github PK

View Code? Open in Web Editor NEW
52.0 7.0 35.0 22.22 MB

Exploring how to quickly and easily design/prototype/deploy high quality digital forms for UK Gov. Based on the excellent work by DEFRA. Currently maintained by [email protected] at Caution Your Blast and a community collaboration between FCDO, HO, GDS, DfE, DIT, Version 1, UKHSA

Home Page: https://digital-form-builder-designer.herokuapp.com/app

License: MIT License

Shell 0.03% JavaScript 15.17% HTML 8.36% Dockerfile 0.62% SCSS 1.52% TypeScript 72.55% Procfile 0.01% Gherkin 1.75%
digital-form-builder form-builder

digital-form-builder's Introduction

XGov Digital Form Builder

Gitter

contributions

Issues and pull requests are welcome. Please check CONTRIBUTING.md first!

This repository is a mono repo for

  • @xgovformbuilder/runner - Hapi server which can 'run' a form from a JSON file
  • @xgovformbuilder/designer - A React app to aide in form building
  • @xgovformbuilder/model - Serves the data model and other helpers
  • @xgovformbuilder/e2e - end to end tests

The repos are forked from DEFRA's digital form builder.

This is a (getting close to) zero-install yarn 2 workspaces repository. .yarnrc.yml allows us to align our yarn environments. Please commit any plugins in .yarn, but do not commit your .yarn/cache. CI will save and restore the caches.

Workspaces will deal with sym-linking the packages, so we do not have to manually run yarn link. It will also deal with hoisting the node_modules for any packages that are shared between the repos, thus decreasing any install times. Hopefully it all just works™️.

Also see the individual repo README files for additional info:

Setup

Always run scripts from the root directory.

  1. Make sure you are using node 18 node --version.
  2. Make sure you have yarn 1.22+ installed. You do not need to install yarn 2.4+, yarn will detect the yarn 2 binary within .yarn and that will be used.
  3. If using the designer:
    • Note that the designer requires the runner to be running with the default NODE_ENV=development settings (see runner/config/development.json) to enable posting and previewing of forms during design.
  4. Run $ yarn command to install all dependencies in all workspaces.
  5. Run $ yarn build to build all workspaces (this is needed because dependencies can depend on each other).

As already mentioned, always run scripts from the root directory. because workspaces don't have scripts or packages you need to run from inside their folders and by running in the root directory yarn 2 can resolve the scripts/packages properly.

To learn more about workspaces, check these links:

I want to...

run a specific workspaces' script

$ yarn [runner|designer|model] name-of-script

eg.: yarn designer start or yarn runner add babel-core --dev

run a script for each of the workspaces

$ yarn workspaces foreach run name-of-script

watch and build for changes across all repos

I wouldn't recommend it unless you have a beefy processor.

$ yarn watch

add a dependency to all workspaces

$ yarn add packagename

create a new workspace

  1. create a new directory for the workspace and yarn init it
    1. $ mkdir myNewLib
    2. $ cd myNewlib
    3. $ yarn init
  2. in the root package.json
    1. add myNewLib to the workspaces object.

Troubleshooting

If you have any problems, submit an issue or send a message via gitter.

Error: ENOENT: no such file or directory, scandir 'xxx/node_modules/node-sass/vendor'

/vendor is not present since it hasn't been built or rebuilt. You may also get this issue with core-js, fsevents, nodemailer etc. $ yarn rebuild to rebuild all the packages $ yarn rebuild only node-sass to rebuild just node-sass

CI

We're using GitHub actions to run our CI process. View a visualisation of the workflow here.

Versioning

Version numbers will automatically increment based on commit messages and SemVer (Major.Minor.Patch). When merging, prepend your merge commit with the following:

  • major: or breaking: - for example, breaking: removing feature X. This will increment the MAJOR version - for example: 1.1.0 to 2.0.0
  • minor: or feature: - for example, feature: new component. This will increment the MINOR version - for example: 1.1.0 to 1.2.0
  • patch: or fix: - for example, fix: url bug - this will increment the PATCH version - for example: 1.0.0 to 1.0.1 (this will also happen by default)

Development environment

The development workflow is triggered whenever a PR is merged into main, and you can monitor it on the repository's action tab.

The workflow contains two separate jobs that run in parallel, one for the Runner and another for the Designer application.

Both jobs work as follows:

  1. Build the docker image with all dependencies.
  2. Push image to Heroku Container Registry.
  3. Release the latest image.

The latest releases will be running here: Runner / Designer.

Smoke tests

A suite of smoke tests are run against all PRs. There is a Cron Job that executes smoke tests against the Heroku deployments and is scheduled to run at midnight every day.

A legacy suite of smoke tests can be found in this repository. They have been removed so that the project can run on node 18.

Smoke tests will be migrated to use cypress.io in the coming months.

digital-form-builder's People

Contributors

adamdavies1 avatar alisalaman-cyb avatar andymoody avatar bertrandmc avatar davidbiddle avatar davidjamesstone avatar dependabot-preview[bot] avatar dvadgama avatar endamccormack avatar froddd avatar gautampachnandahmo avatar harryyo avatar james-sheppard-gov-uk avatar jamesboadi avatar jenbutongit avatar jonnywyatt avatar kakanisridhar avatar mcrawleyhomeoffice avatar mileyd avatar mogusbi-motech avatar nattrass avatar pmshaw15 avatar ramsharma-prog avatar richardbray avatar superafroman avatar thespartan1980 avatar ziggy-98 avatar ziggy-cyb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

digital-form-builder's Issues

Conditions Builder - allow condition reuse

Users should be able to select existing conditions to combine, or to build upon.

E.g. I should be able to do things like:
condition1 and condition2
(condition1 or conditions2) and condition3
(condition1 or condition2) and field is 'value'

Path auto generation - override

Allow users to override the generated path for a page.
Once a user has amended the path, do not overwrite it if the path changes

restructure model package for ez consumption

Is your feature request related to a problem? Please describe.
Currently we are consuming the xx-model library by importing from the compiled code directly. You will need to know in which file the class or helper function lives in order to consume it. lib.js is currently the kitchen sink, and includes joi which depends on node.js builtins. trying to use import {thing} from 'xx-model' will also end up requiring joi.

there is also an issue with defining in package.json {module: src/lib.js}. since rollup is es6 aware, it will try to use lib.js directly (not index.js which is referencing compiled code). since this code is untranspiled, the cjs plugin is trying to read "invalid" code.

Describe the solution you'd like

  • group similar code in dirs such as 'conditions'. inside dir, there should be an index.js, which does the importing/exporting that lib.js currently does
  • compile for node and web separately
    • also compile separately for cjs and es6..?
  • documentation

Describe alternatives you've considered

Additional context

Designer lists - table headings are misaligned

Describe the bug
Looks like the drag handle has been added in the wrong place so the table headings/table data are shifted across one

To Reproduce
Steps to reproduce the behavior:

  1. Go to designer
  2. Click on edit lists, and edit a list
    Screenshot 2020-07-08 at 13 40 58

Expected behaviour
text should line up with text input, value with value, etc
Repository

  • Designer

Desktop (please complete the following information):

  • OS: OSX 10.15.14 (likely to be across board)
  • Browser: chrome, safari
  • Version: Chrome - 83.0.4103.116 (Official Build) (64-bit), safari: Version 13.1

(Optional) text does not appear for optional fields which are shown when a list item is selected

To reproduce:

  1. Add a list with options 'A' and 'B'. Add a 'Text Field' component to option A, and make the Text Field component optional.
  2. Add a page with a radio group using the list defined in step 1.
  3. Access the page in the runner and select Option A.
  4. The text field is displayed with no '(Optional)' text.

Expected outcome:

The text field should be displayed with (Optional) text

Additional Information:

From a bit of investigation it appears that the issue is actually in designer - when saving in list-edit.js we don't attempt to retrieve whether the optional / optionalText fields are set. It appears that if we do try to retrieve this we currently receive no context information about which conditional input of which list item this relates to.

Add ES11/Babel private accessors

Is your feature request related to a problem? Please describe.
#1 - Looks like private accessors aren't working as expected. Updating deps/installing plugins causes others to be out of date

Describe the solution you'd like
Private accessor transpile works

Describe alternatives you've considered
leaving it at _method for now is fine

Additional context
n/a

Documentation

Is your feature request related to a problem? Please describe.
Repo needs more docs!

Describe the solution you'd like
jsdoc is already utilised for some areas. we just need to generate the docs

selecting 'optional' is not selecting or saving

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to designer with any component
  2. Click on 'optional' checkbox
  3. does not check optional box

Expected behavior
It should check the optional box, and when save is called, the component should be required: true

Screenshots
If applicable, add screenshots to help explain your problem.

Repository

  • designer

Desktop (please complete the following information):

  • all

Smartphone (please complete the following information):

  • all

Additional context
Add any other context about the problem here.

retrying payment causes error

Describe the bug
When a payment fails on GOV.UK Pay

To Reproduce
Steps to reproduce the behavior:

  1. Finish a form that requires a payment
  2. fail gov.uk payment
  3. click continue (to return to the service)
  4. click try again
  5. see error

Expected behavior
It should redirect to gov.uk pay successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Repository

  • runner
  • engine

Desktop (please complete the following information):

  • all

Smartphone (please complete the following information):

  • all

Feedback forms

Allow users to specify form-level properties:

  1. What's the form name/title?
  2. Is this a feedback form?
    If yes - disable summary page by default
    - Make any provided url context available to outcomes etc
    - Simplify the UI? There's probably no need for fees etc
    If no - Is there a URL for gathering feedback? If no then hide the feedback link in runner? If there is a URL then should we provide context (form name / path and page name / path)

repeatable pages (unspecified n)

Is your feature request related to a problem? Please describe.
currently repeatable pages must have the n specified before starting the loop

Describe the solution you'd like
Allow an applicant to

  • see a mini summary page
  • be able to add another

Describe alternatives you've considered
already exists!

Additional context
There are some other things to be cautious about, like sections and how we use them, and if "sections" are appropriate for this implementation or if we should use another name like "question group"

Add gitter hook to circleci config

Is your feature request related to a problem? Please describe.
QoL/Enhancement/laziness.

Describe the solution you'd like
Have circleci ping out to gitter so we get notifications for failed builds.

Describe alternatives you've considered
Not being lazy.. I guess. :)

Additional context
gitter says do this:

notify:
  webhooks:
    # A list of hook hashes, containing the url field
    # gitter hook
    - url: YOUR_WEBHOOK_URL

Re-ordering of list items doesn't work

Describe the bug
Re-ordering of items in a list does not appear to work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Edit Lists'
  2. Click on any list or add a new list
  3. Ensure at least 2 items are present
  4. Try to drag items around with the drag handles
  5. Nothing happens

Expected behavior
The list items should be re-ordered and this should be reflected on the screen. The changes should only be persisted on submit.

Screenshots
If applicable, add screenshots to help explain your problem.

Repository

  • designer

Desktop (please complete the following information):

  • OS: Mac
  • Browser Chrome

Additional context
Note that initially I was receiving errors around the items list being undefined (state initialisation didn't allow for this possibility for a new list), and errors around duplicate key values where item-${item.value} always evaluated to 'item-' for new items. I have resolved these issues.

Update dockerfiles

Is your feature request related to a problem? Please describe.
Dockerfiles are out of date for the new workspaces workflow

Describe the solution you'd like
Update dockerfiles to work..!

Configuration persistence

Is your feature request related to a problem? Please describe.
Currently form configuration is only stored in memory, a restart clears the configuration requiring re-upload.

Describe the solution you'd like

  • Different persistent backends should be configurable so you can choose or implement the best option for your needs.
  • Initially we should target S3. But this should be put behind a facade that allows for switching out the implementation.
  • Condifure storage engine in environemnt var PERSISTENT_BACKEND
  • Configure S3 bucket in environment var S3_BUCKET
  • If persistence configured, when form saved, save to backend (and continue to publish to preview)
  • Add a new screen when launching the designer for the first time which list all configs, have a "New" button
  • New generates ID and redirects like now
  • If config selected from list, go to that path
  • When visiting a path, load config from backend rather than preview environment

Describe alternatives you've considered
Make people re-upload their own configurations.

Additional context
Add any other context or screenshots about the feature request here.

Test old components

Designer previously had no unit tests! we should write tests for the existing components.

Is your feature request related to a problem? Please describe.
Previously the designer had no unit tests for the react components. Since then, we've added tests using hapi/lab and sinon for stubbing. We found that this was not fit for purpose, so we're now testing react components with Jest + RTL.

Describe the solution you'd like
Refactor the existing tests so they sit closer to the components, and use jest + RTL.

Describe alternatives you've considered
n/a

Additional context
n/a

Must use import to load ES Module

Describe the bug
The engine is being compiled to ES Modules. Looks like node 12.12 does not like using require(...) when you should be using import.

To Reproduce
Steps to reproduce the behavior:

  1. Build engine
  2. yarn in runner
  3. yarn build && yarn start or yarn dev
  4. Error:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: E:\Repos\HomeOffice\digitaformbuilder\digital-form-builder\engine\index.js
require() of ES modules is not supported.
require() of E:\Repos\HomeOffice\digitaformbuilder\digital-form-builder\engine\index.js from E:\Repos\HomeOffice\digitaformbuilder\digital-form-builder\runner\dist\server\plugins\builder\index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that
package scope as ES modules.
Instead rename E:\Repos\HomeOffice\digitaformbuilder\digital-form-builder\engine\index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from E:\Repos\HomeOffice\digitaformbuilder\digital-form-builder\engine\package.json.

Expected behaviour
Server/s should run!

Repository

  • engine

Desktop (please complete the following information):

  • OS: Windows 10 / OSX 10.15.4
  • node >=12.12

Additional context

There are a few solutions provided by the error message

  • Instead rename engine\index.js to end in .cjs,

  • change the requiring code to use import()

    • the plugin might have to be compiled in mixed cjs/es mode
  • remove "type": "module" engine\package.json

Workaround: use node 12.11

Styles are "flashing"

Describe the bug
When loading a page, occasionally some flashing will occur as the styles load. (I'm assuming two sets of styles are overriding each other)

To Reproduce
Steps to reproduce the behavior:

  1. Go to any page
  2. Click 'next'
  3. See error

Expected behaviour
load one style/font only

Repository

  • runner

Desktop (please complete the following information):

  • chrome

Links are erased when page path changes

Describe the bug
When amending the title / path of a page the links to that page are removed.

To Reproduce
Steps to reproduce the behavior:

  1. Create a page titled 'Dancing Badgers' linked from '/'
  2. Click on the top section of the page representation
  3. Edit the page title and save the amendment
  4. Note that the link from '/' to our new page has been dropped

Expected behavior
The links should be maintained as they were

Repository

  • designer

Desktop (please complete the following information):

  • OS: Mac
  • Browser Chrome

fix react eslint warnings

Is your feature request related to a problem? Please describe.
the eslint rules in the designer repo have been set to warning (1) or off (0), to get builds passing. we should fix them properly, or decide whether or not we want to enforce the rule at all.

Additional context
#66 #85

Summary - after changing answer, summary page 404s

Describe the bug
On the summary page, after changing your answer 404s the summary page.

To Reproduce
Steps to reproduce the behavior:

  1. Complete a form to summary
  2. Click on 'change'
  3. change answer (any field type)
  4. redirects to "page not found"

Expected behavior
Should change the answer and redirect you to summary page with your updated answer

Repository

  • Runner
  • Engine

Desktop (please complete the following information):

  • All (node issue)

Issue building designer with flow inside the model library

Trying to build designer (having already built model) on the 'components-definition' branch I'm receiving an error:

client/index.js → dist/designer.js...
[!] (plugin commonjs) SyntaxError: Unexpected token (9:20) in /Users/andymoody/dev/home-office/digital-form-builder/model/src/data-model.js
../model/src/data-model.js (9:20)
 7: const { ConditionsModel } = require('./conditions/inline-condition-model')
 8: 
 9: function filter (obj: any, predicate: function): any {
                        ^
10:   const result = {}
11:   let key
SyntaxError: Unexpected token (9:20) in /Users/andymoody/dev/home-office/digital-form-builder/model/src/data-model.js
    at Object.pp$4.raise (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:3911:13)
    at Object.pp.unexpected (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:1692:8)
    at Object.pp.expect (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:1686:26)
    at Object.pp$2.parseBindingList (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:2777:17)
    at Object.pp$1.parseFunctionParams (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:2298:22)
    at Object.pp$1.parseFunction (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:2287:8)
    at Object.pp$1.parseFunctionStatement (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:1986:15)
    at Object.pp$1.parseStatement (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:1833:17)
    at Object.parseStatement (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:18653:22)
    at Object.pp$1.parseTopLevel (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:1749:21)

If I change rollup config to try to prevent the src directory being included then I get another error:

../model/src/values/values.js: (4:7)
[!] Error: 'default' is not exported by ../model/node_modules/@babel/runtime/helpers/getPrototypeOf.js, imported by ../model/src/values/values.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
../model/src/values/values.js (4:7)
2: 
3: import type { DataModel } from '../data-model-interface'
4: 
   ^
5: type ValuesType = 'static' | 'listRef';
6: type ValueTypes = 'string' | 'number' | 'boolean';
Error: 'default' is not exported by ../model/node_modules/@babel/runtime/helpers/getPrototypeOf.js, imported by ../model/src/values/values.js
    at error (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:213:30)
    at Module.error (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:15182:16)
    at handleMissingExport (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:15077:28)
    at Module.traceVariable (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:15557:24)
    at ModuleScope.findVariable (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:14211:39)
    at FunctionScope.findVariable (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:9687:38)
    at ChildScope.findVariable (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:9687:38)
    at FunctionScope.findVariable (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:9687:38)
    at ChildScope.findVariable (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:9687:38)
    at Identifier$1.bind (/Users/andymoody/dev/home-office/digital-form-builder/designer/node_modules/rollup/dist/shared/rollup.js:10105:40)


JS 'Flavour' (type checking)

Is your feature request related to a problem? Please describe.
codebase is getting a little unwieldy, and we're starting to implement non native ECMA features when we should really be using a js flavour.

Describe the solution you'd like
flow integration. if it's not "enough" we'll have to implement ts..!

Describe alternatives you've considered
Typescript, which is possibly too big of a job right now.. flow can be added incrementally.

Additional context

User friendly list definitions

  • Allow lists to be defined inline for suitable component types
  • Default list name to the component name?
  • Remove the need to specify a json name for the list

Schema versioning

Break out a shared 'model' library, incorporating the best / necessary bits from designer and engine.

The 'model' library should be responsible for translating historical versions into the latest schema compatible with the current code.
Consider explicit version numbers for easy identification of migrations that need to be applied.
Can joi help us here?

User-friendly conditions

Allow conditions to be defined in a user-friendly way

  • Input labels rather than names
  • Plain english logical operators rather than expr-eval specific
  • Allow conditions to be defined where they're needed rather than having to be defined in advance.
  • Restrict condition creation to inputs that are actually available.

"Are you sure you want to leave [the designer]"

Is your feature request related to a problem? Please describe.
sometimes I get a bit too swipe happy scrolling to the left and trigger the "back" swipe

Describe the solution you'd like
pop up with "are you sure you want to leave"

Describe alternatives you've considered
I haven't

Additional context
Using a magic trackpad. undoubtedly only a trackpad (and possibly only a mac thing..?) issue

'Optional' input misbehaving on component edit.

Describe the bug
Create e.g. a date component and select the 'Optional' checkbox.
Open the component in the editing window. Note that the 'Optional' checkbox is not checked, b

To Reproduce
Steps to reproduce the behavior:

  1. Create e.g. a date component and select the 'Optional' checkbox.
  2. Open the component in the editing window.
  3. Note that the 'Optional' checkbox is not checked, and the "Hide '(Optional)' text" input is displayed

Expected behavior
The optional checkbox should be checked and the 'Hide Optional text' input should be displayed

Repository

  • designer

Conditional Components - associated with list items

Depends on issue #20

Take a look at the implementation of inputs which are revealed within checkbox / radio groups when particular items are selected with the aims of:

  • Defining the component separately to the list itself.
  • Fitting in with the framework defined in Issue #20

Provide components to support URL and National Insurance capture

Is your feature request related to a problem? Please describe.
URL and National Insurance number capture are common problems likely required on multiple forms.
The requirement to capture URLs and NI could be actioned by a user using a 'Text Field' Control and an associated Regex.
This would be dependent on a user defining a Regex each time they wanted to capture a URL or NI.

Describe the solution you'd like
Initially, I thought this could be a set of specific controls to deliver this behaviour.

Describe alternatives you've considered
I am now considering if this should just be an extension to the 'Text Box' Control. ie, radio control on the Text Box control to specify if the control captures URLs or NIs. Or possibly, modifying the RegEx behaviour to be optionally driven from a dropdown of pre-defined Regex's.

"reactify" forms

Is your feature request related to a problem? Please describe.

  • currently saving relies on submitting a form, which is fine, but causes some issues in testing when window.FormData is required

Describe the solution you'd like
This can be gradually as the forms are touched by other features.

  • update forms so on input change sets a state
  • onsubmit just grabs data from state rather than window.FormData

Describe alternatives you've considered

  • we can leave it as is. for testing the window.FormData calls will just have to be stubbed

Additional context

move .transform.js to shared library (or move @xgovformbuilder/lab-babel to mono repo)

Is your feature request related to a problem? Please describe.
previously our test script ran transform something like this lab -t node_modules/@xgovformbuilder/lab-babel, but with yarn workspaces it doesn't play as nicely.

Describe the solution you'd like

  • don't rely on path node_modules (due to hoisting)
  • move .transform.js into a shared workspace

Describe alternatives you've considered

  • unhoist the package

Additional context

(Optional) text is appearing for all sub-fields of DatePartsField

To reproduce:

  1. Add a DateParts field to any page and mark it as optional.
  2. Access the page in the runner.
  3. The DateParts field is displayed with label (Optional) as expected, however it also displays Day (Optional), Month (Optional) and Year (Optional)

Expected outcome:

The DateParts field is displayed with label (Optional) as expected. the Day, Month, and Year inputs should not display the '(Optional)' text

Selecting list selects title instead of name causing /publish endpoint error

Describe the bug
When a user selects a list for a checkbox for example (other components available), it is saving the list title instead of name. It must be the schema validation on upload which is throwing the error. (which is not being handled, so it's not "saving")

To Reproduce
Steps to reproduce the behavior:

  1. Select list for radio/checkbox etc
  2. click save (looks "saved")
  3. refresh
  4. gone!!! (reset to default/new form)

Expected behaviour

  • It should be saving the list name
  • form should still be there after refreshing / closing the app/restarting at the same path id
  • possibly should display an error to user too

Screenshots
If applicable, add screenshots to help explain your problem.

Repository

  • Designer

Desktop (please complete the following information):

  • universal

Smartphone (please complete the following information):

  • universal

possibly could be fixed upstream. this issue is happening our currently deployed container

Streamline Engine install/packing - Yarn workspaces

Is your feature request related to a problem? Please describe.
Now we're using flow #63, #64 we're generating stubs to prevent issues with flow throwing errors to do with not being able to resolve modules. They are being cached, but when yarn install is run in runner or designer, it will try to install + do the postpack script the engine, before continuing. This will happen on the yarn re-link CI stage, which happens twice (once at build, once at test). It adds ~40s to build times.

Describe the solution you'd like
Possibly yarn workspaces will solve this. It was built for monorepos in mind. It might solve the symlinking issues. will have to spike it!

Describe alternatives you've considered
Find another way to package engine. Possibly build engine before starting the other workflows and have it cached.

Additional context

Fix CSS workflow

Is your feature request related to a problem? Please describe.
Designer no longer has a css build process. i believe the runner might've handled building css when the designer was only a plugin.

Describe the solution you'd like
scss -> css at build stage

List items don't seem to be being filtered by condition

Describe the bug
List items don't seem to be being filtered by condition

To Reproduce
Steps to reproduce the behavior:

  1. Add a list with options 'A' and 'B'
  2. Add a page with a radio field 'myField' based on the list created in step 1.
  3. Add a condition based on 'myField' is 'A'
  4. Add another list with some options which are controlled by the condition created in 3 and some which are not.
  5. Add a page with a radio field based on the list created in step 4
  6. Link the two pages
  7. Go to the runner and step through the form selecting 'B'
  8. Note that the options with conditions are still displayed

Expected behavior
The list items protected by the condition should not be displayed

Screenshots
If applicable, add screenshots to help explain your problem.

Repository

  • runner

Desktop (please complete the following information):

  • OS: iOS
  • Browser Chrome

Define Radios and Checkboxes without lists

Is your feature request related to a problem? Please describe.
Radio and Checkbox components being driven from lists doesn't make much sense and is making defining conditional components more complex.

Describe the solution you'd like
Create RadioGroup / CheckboxGroup that can have multiple Radio or Checkbox children. Define the label and value for each Radio in that component.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.