Coder Social home page Coder Social logo

accordproject / web-components Goto Github PK

View Code? Open in Web Editor NEW
114.0 14.0 93.0 18.78 MB

React Components for Accord Project

License: Apache License 2.0

HTML 0.52% JavaScript 98.40% CSS 1.09%
react concerto ergo cicero legal legaltech accord-project smart-contracts hacktoberfest

web-components's Introduction

Accord Project Web Components

Build Status join discord

This repository contains a library of user interface components that can be used to create web-applications based on Accord Project technology. The components use the React ( JavaScript library )

Repository Structure

This repository is a monorepo, built using lerna. Each package is published as an independent npm module.

Netlify is used to automatically publish the static site generated by Storybook.

Use the interactive Storybook to discover the components and their properties.

View the Live Storybook Demo or Run Locally

Sample Project

To use these components refer to: https://github.com/accordproject/web-components-starter If you are not already using semantic-ui-react in your project, be sure to include import 'semantic-ui-css/semantic.min.css' in the entry point of your react app.

Run Locally

npm install -g lerna
lerna clean && lerna bootstrap && lerna run build
cd packages/storybook
npm i
npm run storybook

User Interaction Testing (e2e tests)

Install cypress app on your local system: https://download.cypress.io/desktop

Check if the system requirements are matched: https://docs.cypress.io/guides/getting-started/installing-cypress.html#System-requirements

Start the storybook

cd packages/storybook
npm run storybook

Execute the following script to start e2e tesing

cd packages/storybook
npm run test:e2e

If you are writing the tests and want to see the tests in a browser, then do the following

cd packages/storybook
npx cypress open

Accord Project Logo

GitHub license Join the Accord Project Slack

Accord Project is an open source, non-profit, initiative working to transform contract management and contract automation by digitizing contracts. Accord Project operates under the umbrella of the Linux Foundation. The technical charter for the Accord Project can be found here.

Learn More About Accord Project

Contributing

The Accord Project technology is being developed as open source. All the software packages are being actively maintained on GitHub and we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code.

Find out what’s coming on our blog.

Join the Accord Project Technology Working Group Discord channel to get involved!

For code contributions, read our CONTRIBUTING guide and information for DEVELOPERS.

README Badge

Using Accord Project? Add a README badge to let everyone know: accord project

[![accord project](https://img.shields.io/badge/powered%20by-accord%20project-19C6C8.svg)](https://www.accordproject.org/)

License

Accord Project source code files are made available under the Apache License, Version 2.0. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0).

Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respective owners. See LF Projects Trademark Policy.

web-components's People

Contributors

amanda-ariyaratne avatar aniruddha-shriwant avatar atoughman avatar conste11ations avatar cronus1007 avatar d-e-v-esh avatar dependabot[bot] avatar diana-lease avatar dianalease avatar dselman avatar gatij10 avatar hohooio823 avatar ian-yy avatar irmerk avatar jeromesimeon avatar justinclanglinais avatar k-kumar-01 avatar martinhalford avatar mttrbrts avatar petrgazarov avatar rkotangoor avatar sahalsaad avatar sanketshevkar avatar tc5022 avatar tech-bash avatar udbhavbisarya23 avatar whyang0808 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web-components's Issues

Hyperlink Modal Disrupts History

Describe the bug
A user cannot undo a link if forwarding through a hyperlink modal in history

To Reproduce
Steps to reproduce the behavior:

  1. Go to the live demo
  2. Create new empty paragraph
  3. Select hyperlink, type in a word and a hyperlink
  4. Navigate back in history
  5. Navigate forward, see hyperlink modal appear, navigate forward again
  6. Cannot navigate backward in history anymore

Expected behavior
History should not be interrupted by the hyperlink modal

Add Husky and Lint Staged

Is your feature request related to a problem? Please describe.
Sometimes the developer commit consist of linting error

Describe the solution you'd like
It will automatically fix the linting error and don't let the developer commit without fixing the lint error

Additional context
I would like to work on it

Editing for nested quotes and lists

Is your feature request related to a problem? Please describe.
Markdown can support nested quotes and lists. Those seem to be properly imported in the editor, but one cannot edit those or create them directly using the toolbar.

Describe the solution you'd like
It would be nice to be able to create a quote containing a list or a list containing a quote, or a quote containing a list containing a quote. This might require some thinking about the scope for the toolbar buttons.

Reduce Prop Reliance

We should not be in the habit of relying on a lot of styling props for individual fields. This practice has gotten out of hand:

ContractEditor
  clauseProps = {
    BODY_FONT (string),
    CLAUSE_BACKGROUND (string),
    CLAUSE_BORDER (string),
    CLAUSE_ICONS (string),
    COMPUTED_COLOR (string),
    HEADER_FONT (string),
    VARIABLE_COLOR (string),
    CONDITIONAL_COLOR (string),
};
  editorProps = {
    BUTTON_BACKGROUND_INACTIVE (string),
    BUTTON_BACKGROUND_ACTIVE (string),
    BUTTON_SYMBOL_INACTIVE (string),
    BUTTON_SYMBOL_ACTIVE (string),
    DROPDOWN_COLOR (string),
    EDITOR_BORDER (string),
    EDITOR_BORDER_RADIUS (string),
    EDITOR_HEIGHT (string),
    EDITOR_MARGIN (string),
    EDITOR_SHADOW (string),
    EDITOR_WIDTH (string),
    TOOLBAR_BACKGROUND (string),
    TOOLTIP_BACKGROUND (string),
    TOOLTIP (string),
    TOOLBAR_SHADOW (string),
};


ErrorLogger
  errorsPropsObject = {
    ERRORS_HEADER_BACKGROUND (string),
    ERRORS_HEADER_BACKGROUND_HOVER (string),
    ERRORS_HEADER_EXPAND_ARROW (string),
    ERRORS_HEADER_BORDER_TOP (string),
    ERRORS_HEADER_SHADOW (string),
    ERRORS_DISPLAY_BACKGROUND (string),
    ERRORS_DISPLAY_SHADOW (string),
    ERRORS_DISPLAY_Z_INDEX (string),
    ERROR_BORDER_BOTTOM (string),
    ERROR_EXPAND_ARROW (string),
    ERROR_FILE (string),
    ERROR_FILE_HOVER (string),
    ERROR_TYPE (string),
    ERROR_FULL_MESSAGE (string),
    ERROR_SHORT_MESSAGE (string),
};


Navigation
  navigationProps = {
    NAVIGATE_SWITCH_TITLE_ACTIVE_COLOR (string),
    NAVIGATE_SWITCH_TITLE_INACTIVE_COLOR (string),
    NAVIGATE_SWITCH_TITLE_FONT_FAMILY (string),
    NAVIGATION_POSITION (string),
    NAVIGATION_TOP_VALUE (string),
    NAVIGATION_MAX_HEIGHT (string),
    NAVIGATION_WIDTH (string),
    NAVIGATION_BACKGROUND_COLOR (string),
    CONTRACT_NAVIGATION_HEADER_COLOR (string),
    CONTRACT_NAVIGATION_CLAUSE_COLOR (string),
    CONTRACT_NAVIGATION_CLAUSE_HEADER_COLOR (string),
    CLAUSE_NAVIGATION_TITLE_COLOR (string),
    CLAUSE_NAVIGATION_TITLE_HOVER_COLOR (string),
    CLAUSE_NAVIGATION_EXPANSION_ARROW_COLOR (string),
    CLAUSE_NAVIGATION_EXPANSION_ARROW_HOVER_COLOR (string),
    CLAUSE_NAVIGATION_FILE_DELETE_COLOR (string),
    CLAUSE_NAVIGATION_FILE_DELETE_HOVER_COLOR (string),
    CLAUSE_NAVIGATION_FILE_ADD_COLOR (string),
    CLAUSE_NAVIGATION_FILE_ADD_HOVER_COLOR (string),
};


TemplateLibrary
  libraryPropsObject = {
    ACTION_BUTTON (string),
    ACTION_BUTTON_BG (string),
    ACTION_BUTTON_BORDER (string),
    HEADER_TITLE (string),
    SEARCH_COLOR (string),
    TEMPLATE_BACKGROUND (string),
    TEMPLATE_DESCRIPTION (string),
    TEMPLATE_TITLE (string),
};

All of these should be removed and we should instead rely on a strong system of structured class names. This will allow users to handle what these props currently do via overriding the CSS.

Related Issue:

Support Nested Lists

Is your feature request related to a problem? Please describe.
The editor should support nested lists with a keyboard handle for SHIFT + ENTER and toolbar buttons for indent and outdent

Describe the solution you'd like
Design from @Michael-Grover, this should wrap a list in a further list if it is a descendent of a list

Describe alternatives you've considered
Further work can be done on indenting paragraphs in the future

Additional context
Lists in the schema should support other lists

Account for the commented out underline code

Component: Model Editor

Is your feature request related to a problem? Please describe.
Provide a specific editor to handle the model files

Describe the solution you'd like
Inspiration could be taken from the #59 Logic Editor

Describe alternatives you've considered
N/A

Additional context
N/A

SHIFT+Enter Inside Variable

Describe the bug
A user can create a new paragraph within a variable

To Reproduce
Steps to reproduce the behavior:

  1. Go to the demo
  2. Click anywhere in "Party A" in the first line
  3. Press SHIFT + Enter
  4. See new paragraph created

Expected behavior
This should be restricted

Dynamic Toolbar Styling

Is your feature request related to a problem? Please describe.
The Toolbar should accept props to render certain buttons. It should therefore also render well no matter which buttons are toggled on.

Describe the solution you'd like
This could possibly have a minimum cap, such as Styles, bold, italic, and underline. Input would be helpful (@Michael-Grover)

Describe alternatives you've considered
css-grid may not actually be the best solution here, feel free to explore other options

Additional context
This relates to Issue accordproject/markdown-editor#35

Pop-up Variable Editors

Providing a modal pop-up to edit variables would be useful as it would constrain users from entering bad data. The variables could be rendered as links in the contract text, and clicking on a variable should open the appropriate pop-up. See designs from @Michael-Grover.

  • String variable: unconstrained text input
  • String variable with regex in model: constrain text input based on a regex
  • Integer/Long variable: whole numbers only (including negative numbers)
  • Float/Double variable: floating point numbers only (including negative numbers)
  • Numeric variable with range validation: constrain numeric variable based on upper and lower range
  • DataTime variable: calendar pop up (allowing user to enter Date, Time or DateTime), along with a timezone
  • Monetary Amount
  • Temporal Duration
  • Temporal Period
  • Boolean variable: a drop down with true/false (or similar)
  • Anything else : unconstrained text input

Describe the solution you'd like

We should ensure that we don't duplicate the logic in the concerto-ui React form component, which can create React forms for Concerto types. The pop-ups will want to delegate to concerto-ui to ensure consistency.

Note that the concept of Variable is defined by the Contract Editor via a plugin, here:
https://github.com/accordproject/web-components/blob/master/packages/ui-contract-editor/src/components/Variable/index.js

When variables are clicked we should open a modal to edit them. Conceptually this is similar to how links are handled in the base markdown editor, so that can be used as a reference. We will want any code that handles variables to be in the contract-editor.
https://github.com/accordproject/web-components/blob/master/packages/ui-markdown-editor/src/FormattingToolbar/index.js#L51

sample Data invalid when using range validator

Describe the bug
When using concerto-ui with models which are using range validators in their Models, Sample Data isn't provided correctly

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://concerto-ui.netlify.com/
  2. Change the 'FragileGoodsClause' to i.e.
asset FragileGoodsClause extends AccordContract {
  o AccordParty buyer
  o AccordParty seller
  o MonetaryAmount deliveryPrice
  o Double accelerationMin range=[0.0,10.0]
  o Double accelerationMax
  o MonetaryAmount accelerationBreachPenalty
  o Duration deliveryLimitDuration
  o MonetaryAmount lateDeliveryPenalty
}
  1. Select FragileGoodsClause in the Declaration Selection
  2. Inspect the form and its default Values

Expected behavior
Default Values which fit the validators OR at least default values in all fields without validators

Screenshots
grafik

Desktop (please complete the following information):

  • Browser Firefox
  • Version 74.0

Additional Context
The console shows an error similar to the following one:
Error: "Validator error for field org.accordproject.cicero.contract.AccordParty#6280 io.clause.demo.fragileGoods.FragileGoodsClause.accelerationMin: Value is outside upper bound 207.253"

Line Break not preserved on paste

Describe the bug
When copying multiple lines and then pasting them, the line breaks are not preserved.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the demo
  2. Select "This is a
    hard break."
  3. Press Mod+C to copy
  4. Select somewhere in the middle of "This is a
    hard break."
  5. Press Mod+P to paste
  6. See that the line break from the copied text has not been preserved.

Expected behavior
The line break should be preserved, such that there are now three lines in the section.

See Loom video
https://www.loom.com/share/cf0dd7088d964e9a93a5259deccfd190

Underline Text in List

The underline style can not be applied to text in an ordered or unordered list. The bold, italic, and code styles work for text in a list.

Example of a real contract where parts of an ordered list are underlined, which currently isn't possible in our editor:
image

Markdown support: HTML blocks

Is your feature request related to a problem? Please describe.
Html blocks are a markdown feature that the editor currently does not support

Describe the solution you'd like
The ability to create/edit/delete html blocks.

May need to think about security risk!

User Interaction Testing

This issue will track the tests which need to be implemented in order to increase stability of this codebase. Please feel free to add suggestions.

MASTER_TOOLBAR:

  • Heading 1, 2, 3
  • Keyboard Shortcuts
  • bold
  • italic
  • hyperlink
  • code
  • > block_quote
  • ol_list
  • ul_list

MASTER_HISTORY_CHECK:

  • Undo
  • Redo

Contract Editor

Clause Templates

  • Clause template actions
    • Delete clause template (actually remove)
      • MASTER_HISTORY_CHECK
    • Edit clause template (function call)
    • Test clause template (function call)
  • Add clause template
    • MASTER_HISTORY_CHECK
  • lockText checks
    • Paste, cut inside
    • MASTER_TOOLBAR
  • Copy paste clause template

Variables

  • Cannot be removed (quotation marks should remain)
  • Conditional
    • Toggle roundtrip
    • Hover tooltip

Template Library

Error Logger

Navigation

Formulae UI

Dragging Image Duplicates

Describe the bug
Selecting and dragging an image within the Editor duplicates it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the demo
  2. Click on the Concerto Model Image or insert a new one
  3. Drag it to a new position
  4. The image is duplicated

Expected behavior
Only the position of the image should be changed.

Screenshots
Markdown Editor (5)

Use of JavaScript Date should probably be switched to Moment

Both for stability and consistency with the rest of the Accord Project stack, it might be preferable to use moment for date creation rather than the custom use of the JavaScript Date() call.

This is notably affects code here: https://github.com/accordproject/concerto-ui/blob/f8b533d2e93d8526aa0bab708dcd0721f367c8ba/packages/concerto-ui-react/src/reactformvisitor.js#L243
or
here: https://github.com/accordproject/concerto-ui/blob/f8b533d2e93d8526aa0bab708dcd0721f367c8ba/packages/concerto-ui-react/src/reactformvisitor.js#L504-L520

Also creation of dates in local timezone cannot be easily tested.

Markdown support: Code blocks

Is your feature request related to a problem? Please describe.
Code blocks are a useful markdown feature. It would be nice if the editor supports them.

Describe the solution you'd like
The ability to create/edit/delete code blocks.

Maybe the ability to turn into a selection into a code block would be nice as well/

Initial Linebreak not Preserved on Paste

Describe the bug
Copy/paste within the editor doesn't preserve a linebreak if it is the beginning of the copy.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the live demo
  2. Select This is ***bold and italic*** text., and select up to the end of the previous paragraph
  3. Press CTRL-C to copy
  4. Press CTRL-V to paste
  5. Note that the linebreak is not preserved

Expected behavior
Entire selection should be used in copy/paste

Creating code blocks unexpectedly creates (nested) code inlines

Describe the bug
Creating a code block does not create a code block but different levels of code inlines.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the markdown editor
  2. Select a paragraph
  3. Click on 'code' button
  4. It does not create a code block, but some code inlines

Expected behavior
Selecting a paragraph (or multiple paragraphs) and clicking code should create a code block.

Screenshots
Screenshot 2020-02-17 at 10 41 19 AM

Input field needs validation

Describe the bug
Input fields need validation on the client-side, many fields are showing ambiguous behaviour,

To Reproduce
Steps to reproduce the behaviour:

  1. Open Safari or Firefox browser.
  2. Go to form and choose any Declaration Selection
  3. Click on any field they can accept any value irrespective of what defined
  4. See Error

Expected behaviour
It should prompt the user with a warning as a label

Screenshots
time and date

Desktop (please complete the following information):

  • OS: MacOS Catalina
  • Browser : [safari, firefox]

Note: This is a browser-specific issue hence a strict validation needs to be done

Here's a portion of it is being discussed, https://github.com/accordproject/concerto-ui/issues/24#issuecomment-589997344 but since Safari/Firefox doesn't enforce the user to enter 'typed' data validation needs to be done on almost all of the fields.

Contract-level Variables

Is your feature request related to a problem? Please describe.
Parameter support (contract editor)

Describe the solution you'd like
Example of these variables are parties

Describe alternatives you've considered
N/A

Additional context
Related issues:

User Interaction Testing

This issue will track the tests which need to be implemented in order to increase stability of this codebase. Please feel free to add suggestions.

MASTER_MARK_LIST: (@RiverceeBontu)

  • bold, italic, hyperlink, code
  • bold+italic, bold+hyperlink, bold+code
  • italic+hyperlink, italic+code
  • code+hyperlink
  • bold+italic+hyperlink, bold+italic+code
  • italic+code+hyperlink, italic+code+bold
  • bold+italic+hyperlink+code

MASTER_BLOCK_TRANSFORM:

  • block_quote to ul_list
  • ul_list to block_quote
  • block_quote to ol_list
  • ol_list to block_quote
  • ul_list to ol_list
  • ol_list to ul_list

MASTER_HISTORY_CHECK:

  • Undo
  • Redo

Toolbar

Headings (@sanketshevkar)

  • Selecting a paragraph and changing to header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Selecting a word in paragraph and changing to header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Placing cursor in paragraph and changing to header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Switching header 1 to header 2, 3, paragraph
    • MASTER_HISTORY_CHECK
  • Switching header 2 to header 1, 3, paragraph
    • MASTER_HISTORY_CHECK
  • Switching header 3 to header 1, 2, paragraph
    • MASTER_HISTORY_CHECK
  • Switching paragraph to header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Switching paragraph with all combinations to header 1, 2, 3
    • MASTER_HISTORY_CHECK
    • MASTER_MARK_LIST
    • MASTER_HISTORY_CHECK
  • Make a block_quote into header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Make a list_item in ul_list into header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Make a list_item in ol_list into header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Make entire ul_list into header 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Make entire ol_list into header 1, 2, 3
    • MASTER_HISTORY_CHECK

Marks (@Cronus1007)

Bold

  • Make all combinations bold
    • Paragraph
    • Text in paragraph
    • Text in word
    • Heading 1, 2, 3
    • italic, italic+code, code
    • ul_list and ol_list with MASTER_MARK_LIST
    • MASTER_HISTORY_CHECK
  • Undo bold
  • Enable bold and type more characters
    • MASTER_HISTORY_CHECK

Italic

  • Make all combinations italic
    • Paragraph
    • Text in paragraph
    • Text in word
    • Heading 1, 2, 3
    • bold, bold+code, code
    • ul_list and ol_list with MASTER_MARK_LIST
    • MASTER_HISTORY_CHECK
  • Undo italic
  • Enable italic and type more characters
    • MASTER_HISTORY_CHECK

Code

  • Make all combinations code
    • Paragraph
    • Text in paragraph
    • Text in word
    • Heading 1, 2, 3
    • italic, italic+bold, bold
    • ul_list and ol_list with MASTER_MARK_LIST
    • MASTER_HISTORY_CHECK
  • Undo code
  • Enable code and type more characters
    • MASTER_HISTORY_CHECK

Blocks

  • Swap block types
    • MASTER_BLOCK_TRANSFORM
    • MASTER_HISTORY_CHECK
  • Add mark to block
    • MASTER_MARK_LIST
    • Heading 1, 2, 3
    • MASTER_HISTORY_CHECK
  • Add hyperlink to block
    • MASTER_HISTORY_CHECK

Hyperlink

  • Add hyperlink to MASTER_MARK_LIST text
    • MASTER_HISTORY_CHECK
  • Add hyperlink to blocks
    • MASTER_BLOCK_TRANSFORM
    • MASTER_HISTORY_CHECK

Images

  • Add image
    • MASTER_HISTORY_CHECK
  • Remove image (backspace)
    • MASTER_HISTORY_CHECK
  • Transform and ensure image remains untouched
    • All headings
    • All marks
    • All blocks
    • Hyperlink

Rendering

Breaks

  • Softbreak
  • Linebreak

Actions

Shortcuts

  • Marks
    • MASTER_HISTORY_CHECK
  • Blocks
    • MASTER_HISTORY_CHECK
  • Hyperlink
    • MASTER_HISTORY_CHECK

Filter Templates by Cicero Version

Is your feature request related to a problem? Please describe.
The Library component should have the capability to filter by cicero version

Describe the solution you'd like
If the templates passed to the component do not all have the same Cicero version, we should display a dropdown with the versions represented. Selecting a version from the dropdown should filter the templates by that version.

Describe alternatives you've considered
Open to input

Additional context
N/A

SHIFT+Enter in Blockquote

Describe the bug
A user cannot create a line break within a blockquote.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the live demo
  2. Click at the end of the first paragraph
  3. Press Enter and type something
  4. Format as a blockquote with the toolbar
  5. Press SHIFT + Enter
  6. A new blockquote is made

Expected behavior
Pressing SHIFT + Enter inside a block quote should create a new line within the blockquote

Some Possible Improvements to Redo/Undo

A few things do not feel entirely natural with the current Undo/Redo behaviour:

  1. Sometimes it takes several clicks for a change to be undone/redone. I think because it tracks selection or cursor position changes. I'm not sure what the usual/expected behaviour for editor is, but it felt a little cumbersome
  2. the above issue is compounded by the fact that you don't always have a visual hint (undo after a selection + change does not always show the previous step in the usual "blue" selected area)
  3. it would be really nice if the redo/undo buttons in the toolbar would be shaded differently when reaching the beginning or end of the history (i.e., when there is no more redo or undo available)

Better editor for linked data

Provide a better editor experience to edit links. E.g. see what Google Docs does, or other comparable editors.

This should be pluggable so that the user can define a custom editor for dates/times etc.

Add support for tables

Many markdown files contain tables. It would be very useful for the editor to support these files.

Describe the solution you'd like
UI to render and edit tables.

Additional context

We will need to extendsaccordproject/markdown-common and the CommonMark DOM to represent tables, as well as the other transforms to support them.

Slate tables demo: https://www.slatejs.org/examples/tables
Table in commonmark discussion: https://talk.commonmark.org/t/tables-in-pure-markdown/81/9
GFM: https://github.github.com/gfm/#tables-extension-

Handle Underline in Markdown

To Be Done Instead of OR After Issue #27

Since transitioning to utilize the markdown-transform, we will need to take a step back from supporting underline for the time being. Markdown doesn't natively support underline, so we need to rethink how we serialise this.

We can then experiment with using html tags for underline.

User interface to insert a thematic break

Markdown supports the concept of a thematic break which markdown-pdf interprets as a page break (--- in markdown). Having a toolbar item to insert a thematic break in the markdown editor would allow users to control where page breaks occur in PDFs that are generated from the contents of the editor.

The thematic break should be rendered in Slate to indicate that a page break will occur. E.g.

---- page break ---- 

Or similar.

In CommonMark this is represented by an org.accordproject.commonmark.ThematicBreak node. See:
https://models.accordproject.org/markdown/[email protected]

Component: Template Execution & Testing

Execution & Test component

  • Provide the ability to execute template logic on a given request, for a given state
  • Allow to set the current time
  • Allow to select tests based on template's Cucumber tests
  • Allow to save a new test into the template

Copy Paste Lists doesn't Wrap First List Item

Describe the bug
Copy/Paste List Items doesn't wrap the first Item in the List.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the demo
  2. Select the existing list in the editor
  3. Press CtrlC to Copy
  4. Press CtrlV to Paste
  5. The first Item of the list is not wrapped within the list

Expected behavior
All the items should be wrapped within the list.

Screenshots
lists-2

Additional context
Please note that an Ordered List on Copy/Paste also changes to Unordered List in markdown.

Component: Clause Template Editor

Is your feature request related to a problem? Please describe.
Provide a specific editor to handle the clause templates

Describe the solution you'd like
This likely will happen within the ContractEditor and will edit a clause template with rich text formatting

Describe alternatives you've considered
N/A

Additional context
N/A

Can type letters into a number field

Describe the bug
The form field created for numeric fields allows the user to type letters.

To Reproduce
Steps to reproduce the behavior:

  1. Open a form on a CTO model that contains a numeric field
  2. Note that the field has the up and down spinner to change the number
  3. Type a letter into the field
  4. See error

Expected behavior
Letters should be prevented?

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser Safari
  • Version Latest

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.