Coder Social home page Coder Social logo

vue-grid-designer's People

Contributors

sharq88 avatar thefoot avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

vue-grid-designer's Issues

CSS variables are applied at root (HTML) scope

The CSS vars used by the component:

<style lang="scss">
:root {
	--color-highlight: 55, 114, 255;
	--color-highlight-faded: 215, 227, 255;
	--color-active: 150, 5, 5;
	--color-black: 0, 0, 0;
	--color-white: 255, 255, 255;
	--color-lightgrey: 240, 240, 240;
	--color-darkgrey: 76, 76, 76;
}
</style>

.. are applied to the host application, however - they aren't named with any reference to VDG - so there is potential for a clash.

Including them in a scoped doesn't work at all - not even withing local component development, hence why they exist in a globally scoped block atm.

Hopefully Vue will include support soon for a :host selector - to be applied to the component root: vuejs/vue-loader#1601

Implement new block and row callbacks.

There is currently no way to create custom blocks or rows structures.

Why is this needed? Because otherwise custom grid properties won't be applied to new objects. Doh.

Move vue into devDependencies

If a Vue application using this component chooses to include Vue as a browser script tag (to keep bundle size small for example), it may use a different version than this component uses.

Problems occur with vue-template-compiler which must match the Vue version. NPM can sort this out normally (if the App uses the Vue NPM module).

Easiest to just assume that a Vue app will already include Vue as it needs it :) Well der ...

[!] Error: 

Vue packages version mismatch:

- [email protected] ([...]/node_modules/vue/dist/vue.runtime.common.js)
- [email protected] ([...]/node_modules/vue-template-compiler/package.json)

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

Dragging a block to the last position in the row doesn't show the ghost element correctly

When you drag a block from one row to the next, into the last position on the row, the ghost element shows on the next "line" (correct row).

Expected behavior
The ghost element should appear as the last block in the row.

Actual behavior
The toolbar element (even though it is filtered out of the draggable list) is causing SortableJS to get confused, because it is a child element of the row.

Could file a bug with SortableJS.. ๐Ÿค” Would rather fix the toolbar placement though.

Main issue is making sure we don't resort to DOM hacks (not very Vuey), and also being able to pass current row/block scope vars to the toolbar action buttons.

@rorysmorris suggested to move the element outside the row, and position it using a style binding for x/y coords. On row hover - store the current row/block as component data, as well as x/y coords.

Single block can never reach full size

Describe the bug
A single block can never reach full size

To Reproduce
Steps to reproduce the behavior:

  1. Go to demo page https://thefoot.github.io/vue-grid-designer/ Basic Props tab
  2. Delete second block (click X button of block)
  3. Expand first row (click plus button of block twice)

Expected behavior
A block to reach full size

Actual behavior
Row remains 3 block width (instead of 4)

Need the ability to re-order rows

There is currently no way to re-order rows, other than to delete and recreate!

Option 1 - Implement grid sortable to facilitate drag and drop for rows. UX issues though - too many drop zones, need additional row drag handle..

Option 2 - Implement move up / down buttons on the row toolbar. Not in line with the whole DnD ethos. But probably far more usable and easier to implement.

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.