Code Monkey home page Code Monkey logo

screen-builder's Introduction

ProcessMaker Screen Builder

@processmaker/screen-builder is a VueJS powered Screen Builder that produces compatible JSON for our vue-form-renderer.

Project setup

Clone the repository and cd into the screen-builder directory:

git clone [email protected]:ProcessMaker/screen-builder.git
cd screen-builder

Install dependencies using NPM, then run the local development server:

npm i
npm run serve

Testing

Unit tests are set up using jest and end-to-end tests are set up using Cypress. Tests can be run locally with the following commands:

# Run the Jest unit test suite
npm test

# Open Cypress to run the end-to-end (e2e) test suite
npm run open-cypress

screen-builder's People

Contributors

agustinbusso avatar alvaroflorespm avatar boliviacoca avatar caleeli avatar carlipinell avatar chipit24 avatar danloa avatar dependabot[bot] avatar devmiguelangel avatar eiresendez avatar estebangallego avatar fagubla avatar gproly avatar gustavobascope avatar josechirivella avatar karlos123testing avatar lununezprocessmaker avatar marcoantonionina avatar mcraeteisha avatar milaendo avatar nolanpro avatar pmoskrojas avatar pmpaulis avatar runyan-co avatar ryancooley avatar sanjacornelius avatar tdondich avatar tincodes avatar tuantruong625 avatar velkymx 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

Watchers

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

screen-builder's Issues

Implement Calculated Fields from POC

The javascript parsing is not enabled. Enable it. Allow it to be turned on via click on a button

  • Add a button to turn on advanced mode w/icon (font awesome js-square)
  • Show the javascript parser
  • On edit, if the expression is complex, show the javascript box by default

Error in FormSelect

Error in mounted hook: "TypeError: Cannot read property 'value' of undefined"
node_modules/@processmaker/vue-form-elements/src/components/FormSelect.vue

Scrolling Screwed Up

Each of the three columns should flex and scroll AS NEEDED and INDEPENDENTLY. The toolbar should be locked to the top as well as the footer.

Items in Columns Broken

If I add a multi-column element, the contents of those elements isn't respected in the preview or other uses. Applies to form and mustache elements.

Add support for computed properties as a form property.

So we need a UI to allow definining computed properties on the form data. So if I have two input fields, one is called 'a' and one is called 'b', then I may wanted a computed property called 'c' that is (a + b). So this needs to be something that is stored in the meta form config meta data and handled in the form renderer.

Computed Props Javascript

Trying to add a javascript evaluation to the computed property and it fails with "Error: parse error [1:18]: Expected EOF"

if(+down > 0) 101

Easily pass name of element to child

We need to bind the name of the element to the component so that child elements have easy access. This will be used by the File Downloader in order to specify which file should be displayed/downloaded on the renderer.

Inspector Bug

If you switch between 2 text boxes, the text content in the inspector will not refresh, but rather keep displaying data from the first text box. When you interact with the inspector, the values for the second text box will be overridden with those from the first. In order to effectively edit properties for a 2nd text box, you need to select another (non text box) element first, and then the inspector will update properly.

Steps to Reproduce

  1. Drag a text box into the screen.
  2. Drag a second text box into the screen.
  3. Select the first text box and add some text content in the Inspector pane.
  4. Select the second text box. Notice the text content property did not refresh and still reads the content for the first box.
  5. Select the text content box and add a character or space. notice how the entire content of the second box is now updated to reflect what was both the content for boxes 1 and 2.
  6. Drag a line input into the screen.
  7. select one of the text boxes and then other. notice again how the content does not refresh.
  8. Select the input box and then the text box. notice how when selecting the text box after the input box refreshes its content properly.

WYSIWYG Editor

I'd like to enhance the text editor to allow for a more rich environment on the page. To do this I'd like to add a WYSIWG editor to the input box on the side bar. Extra points for allowing editing inline on the main canvas.

Features to expose:

font style (h1, pre, etc), bold, italic, align (left, center and right), link and code view
If we have room, show the numbered and unnumbered lists
Make sure we can bind parts of the html to the data model.

Use case: a URL generated by a script task

Verify that the enabled tags are whitelisted as part of the save process.

Note the mustache syntax is parsed during rendering. So as long as the mustache syntax is intact in the content, it'll still work.

Possible editors:

https://www.tinymce.com/docs/integrations/vue/
https://trix-editor.org/
https://ckeditor.com/blog/best-wysiwyg-editor-for-vue/

WYSIWG Displays

When you are building screens (not forms) the WYSIWG editor doesnt work at all.

Form Area Hide on Eval

I want to have the ability to hide a field unless a specific criteria is met in the data model

  • Add an inspect box for a FEEL expression
  • Add label "Hide If:"
  • Description: Hide this control unless the following expression is true
  • Run the evaluation in the preview and live form
  • Write Dusk Test to confirm it works

Add support for exporting named exports for components

In order to utilize this package and it's elements, it's important to export named components.

So the standalone application can be a standalone; however, using this in another project should use the exposed components.

The default export should expose a Vue plugin that can be installed to register components to Vue.

Add ID to Element

As a developer I want to be able to access individual form elements using the ID of the surrounding div.

Change the code to use the Field Name of the element as the ID of the element div.

Submit Buttons Not Saving Value

Approve / Reject buttons aren't working
It's supposed to save the value of the button to the data object on submit - it's not, its coming back undefined

image

From user: I have reject/send buttons as shown. the inspector here is showing the Reject. Currently I get sendSMS: undefined

Screen Builder CSS

Add the ability to effect elements via CSS. The CSS should be scoped to the form to ensure it doesn't impact anything outside of the form.

  • Add a button in the grey menu bar (Custom CSS)
  • Add modal to show an editor box for CSS
  • Save the CSS to the config
  • Apply the CSS to the preview and the live form
  • Write test to make sure it saves and is used properly

Update SVG icons

Multicolumn - Allow Config of Number Cols (2-12)

In the inspector, when you click on a multi-column, I want to be able to configure up to 12 columns for display (using bootstrap's grid). Show a drop down with numbers 1-12 and adjust the display accordingly

Preview Not Updating

When I add a record list and a form control, the form control is blank in the preview. I've also noticed that the preview stops updating at some point.

Inputs Not Responding

When I set a value of an input specifically it is not picking up the responsive value from the json data.

Inspector Scrolling

The inspector needs to be able to scroll. Current content is off the screen.

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.