Giter Site home page Giter Site logo

mydraft-cc / ui Goto Github PK

View Code? Open in Web Editor NEW
607.0 607.0 98.0 35.9 MB

Open source wireframing tool written in typescript, react and redux.

Home Page: https://mydraft.cc

License: MIT License

HTML 3.69% TypeScript 93.16% CSS 0.50% JavaScript 0.59% SCSS 2.06%
canvas paperjs react redux scss typescript webpack wireframing

ui's People

Contributors

dependabot[bot] avatar freud14 avatar karimeljed avatar msgoodman avatar sebastianstehle avatar shadman2606 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ui's Issues

Saved diagrams are not restored visually correct

How to reproduce this issue

  1. Add a button with drag'n'drop to the canvas
  2. Copy the button with [CTRL] + [C] / [V]
  3. Move (and rename) the second button
  4. Click "Save"

How it looks after saving:
Screen Shot 2019-09-01 at 19 44 12

  1. Press [F5]

How it looks after reloading:
Screen Shot 2019-09-01 at 19 45 08

An example could be found here: https://mydraft.cc/bllvcvrudnc606vhilgg

First investigation

Not sure if the following is correct, but I started some investigation and may it helps a little bit to point you where to start debugging.

  • Saved and loaded json data looks valid for me.
  • It seams to me, that there is an issue with the deserialization. The visuals get new random ids (maybe a stupid question: why are the id is not reused?). May the actions TRANSFORM_ITEMS and CHANGE_ITEMS_APPEARANCE could not be applied to the visual due to they do not know the new item id.

Pressing delete crashes application

To Reproduce:

(tested on edge and chromium)

open up a new mydraft.cc document (can be an existing one as well)
click the delete icon on an element (or hit the delete key)

Application crashes:

Uncaught TypeError: Cannot read property 'isLocked' of undefined
    at src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2
    at Array.filter (<anonymous>)
    at src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2
    at src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2
    at src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2
    at src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2
    at Object.getSelectedItems (src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2)
    at Function.mapToProps (src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2)
    at r (src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2)
    at h (src.dd5cfa859903f69abebc.js?dd5cfa859903f69abebc:2)
bm8hdqjudnc606vhirfg:1 Failed to load resource: the server responded with a status of 404 ()

Write storage server

Simple GO server that takes diagrams:

  • POST endpoint: Store new diagram, returns secret_token and public_token
  • PUT endpoint: Update diagram with secret_token
  • GET endpoint: Get diagram with public_token

GO server should just store plain json and save it in google storage or other file system.

Templates

Publish a diagram as template and make it available to others or inside the project.

Advanced color editor

  • Custom colors with hex code or RGB / HSV color selector
  • Remember all custom colors for a project

Integrate saving

API: https://api.mydraft.cc

// Get a diagram by token
e.GET("/:token", getDiagram)

// Update a diagram with token and store token
e.PUT("/:token/:writeToken", putDiagram)

// Create a new diagram
e.POST("/", postDiagram)

Deploy Storage server

  • Setup Dockerfile
  • Create org at Dockerhub
  • Upload to Dockerhub
  • Create kubernetes config
  • Deploy to google cloud
  • Find domain

More icon sets

  • Other icon sets like material design
  • Select icon set.

Name shapes

It should be possible to name shapes, especially groups.

Fix drag and drop

Currently the drag and drop has a bug:

react-dnd/react-dnd#2649

Unfortunately the project looks dead to me. I have 2 ideas:

  1. Add the shape to the diagram when the shape is clicked and use the current move functionality. Will be tricky to fix the history.
  2. Find another library.
  3. Provide a fix. But react-dnd is really complicated.

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.