Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: in component first mode, sync works only the first time on UI feedback #4239

Closed
2 tasks done
codingaddicted opened this issue Apr 5, 2022 · 0 comments
Closed
2 tasks done

Comments

@codingaddicted
Copy link
Contributor

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome v100

Reproducible demo link

https://grapesjs.com/demo.html

Describe the bug

How to reproduce the bug?

  1. Create a text block
  2. Apply a style to block (text color)
  3. Create a class and sync the value on it
  4. Edit again the color to another value
  5. Sync again on the class

What is the expected behavior?
As after point 3, even after point 5 the clear style con color field should disappear and the label state move to "warn"

What is the current behavior?
After point 5 the value is correctly synchronized on the class, but che clear style is still active. Moreover, pressing it will cause a sequence of invalid states:

  • clear style active - sync invisible
  • clear style pressed
  • clear style invisible - sync visible
  • sync pressed
  • clear style invisible - sync invisible -> value disappeared from id and class (back to default)

grapes-selector

Code of Conduct

  • I agree to follow this project's Code of Conduct
@artf artf added this to To do in Release v0.19.4 via automation Apr 5, 2022
@artf artf closed this as completed in e040788 Apr 6, 2022
Release v0.19.4 automation moved this from To do to Done Apr 6, 2022
artf added a commit that referenced this issue Jun 9, 2022
* Refactor storage in modules

* Refactor LocalStorage

* Up jsdoc

* Refactor editor store/load methods

* Update LocalStorage

* Update storageManager configs

* Make init always via pages

* Refactor store and load methods

* Update project load

* Refactor RemoteStorage

* up conig

* Catch error for store

* Update load jsdoc

* Update jsdoc

* Refactor load/store in storageManager

* Update jsdoc

* Add onStore and onLoad options to remove

* Update collection load

* Add recvoery to storage

* Refactor StorageManager

* Up

* Update storageManager doc

* Add onLoad/onStore

* Add editor.clearDirtyCount and Storage strategy doc

* Up changesCount

* Update loadProjectData

* Add getStorageOptions

* Update old Storage links

* Update Storage events doc

* Added `projectData` option

* Pass editor to onStore/onLoad

* Update doc with Inline project data

* Remove Model dependency in storages

* Formatted `index.d.ts` for consistency

* Exposed `grapesjs` module declaration

* Fix undeclared return type of `on` method in `Backbone` type declaration

* Fix undefined array type of `plugins` property in `grapejs.EditorConfig` type declaration

* Adjust tests

* Fix terser-webpack-plugin not found

* Update storage tests

* append block on click next to selected component

* fixed index

* Refactor all AssetManager files in classes

* Change to to use classes

* Fix Traits

* Update eslint

* Bump minimist from 1.2.5 to 1.2.6

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Refactor block manager files to classes

* Refactore canvas files to classes

* Refactor code manager files to classes

* Refactor commands files to classes

* Refactor css composer files to classes

* Refactor more files to classes

* More refactor of files to classes

* Fix typo in storage_manager

* Update storage manager types

* fixes in docs and comments

* Fix BUG: Dragging multiple blocks reverses the order #3547

* Update editor types

* Update storage options types

* Remove params

* Avoid triggering __p in styleable:change event

* Use important option in CssRule if specified

* Trigger updateStatus on parentTarget change. Fixes #4239

* Type strong base classes

* added validity check before pasting

Using sorter to test for validity if:
- component can be pasted inside selection
- component can be pasted inside parent of selection

* fix typo in title

* Update config to use simple typed object

* Take into account the canvas scroll offset in getElementPos

* Fix sorter move for single elements

* Convert Canvas to class

* Revert min.js changes

* Revert min.js

* Update config getter

* Fixes canvasView in Canvas module

* Remove console

* Convert i18n to class

* Clear modules before project load

* Remove empty style properties

* Convert EditorModule into class

* Remove init function from EditorModule

* Using Components.canMove() for validation

- shifted to canMove() for paste validation
- fixed typo

* Using canMove() API for validation

- fixed another typo

* Refactor PasteComponents

* Convert EditorModulue to ts

* Use abstract base class

* Replace getConfig(string) to getConfig()

* Fix EditorModule interface

* Convert EditorModel to ts

* Convert EditorView to ts

* Convert Selected to ts

* Convert Editor Config to ts

* Small change

* Converted transform into stack property

Added translation support

* Up types

* Use relative import

* Up i18n

* Bump async from 2.6.3 to 2.6.4

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add transform to default style properties

* Fix requested changes

* Create by default all iframes in stanard mode

* Skip empty data in loadData

* Up wrapper padding

* Fix Properties tests

* Fix index test

* Update loadOnStart for headless

* Update property factory tests

* Up FrameView

* Add GitHub Actions

* Update build

* Up test badge

* Add publish workflow on release create

* feat(locale): add norwegian translation

* Up TS storage

* Up ts namespace

* Ensure id on pages

* Convert Canvas to ts

* Convert Frame to ts

* Convert Page, Pages into ts

* Convert pages into Module class

* Convert Pages index to ts

* Convert Frames to ts

* Convert Styleable to StyleableModel class

* Give more time to the test

* Code cleanup

* Convert State to ts

* Convert ClassTagView to ts

* Convert modules into Classes

* Convert SelectorManager to ts

* Convert Selector into ts

* Convert Selectors to ts

* Convert ClassTagsView to ts

* TS fixes

* [feat] added ts parser for eslint and enabled desired rules

* enable eslint for the entire project

* eslint fixes

* More eslint fixes

* avoidEscape eslint

* eslint fix

* Convert CanvasModule to ts

* Use abstract Model in Canvas

* Convert code to using class

* Convert CanvasView to ts

* Fix TS

* Fix StyleManager with componentFirst option and combined classes. Closes #4310

* Convert DomComponent Module to ts

* Convert ComponentViews to classes

* Link to English Wikipedia

Given that the README is in English, it makes sense to link to English Wikipedia instead of Italian.

* Small edits to getting-started.md

Copy editing to fix typo and punctuation

* Convert rest to ts

* Up lint

* Revert "Up lint"

This reverts commit 1f5b692.

* Revert "Merge pull request #4316 from xQwexx/canvas-module"

This reverts commit 68c60ea, reversing
changes made to 706bf4f.

* Fix addSelector

* Rely on pageYOffset for autoscroll

* Update api.js

* Update jsdocs

* Up test

* Fix lint style

* run format script

* Change to the requested format

* Fixes post components refactor

* Update index.html grapesjs JS

* Comment backdrop attribute of modal

* Fixes for traits and component events

* mixins to TS

* Avoid errors in Resizer if the component is removed. Closes #4333

* Refactor LayerManager (#4338)

* Move Layers to TS

* Update root update in LayerManager. Closes #4083

* Update Layer view

* Update ItemsView

* Move layer opened container

* Clean ItemView

* Update import ItemsView

* Update layer manager module

* Add getComponents to Layers

* Add visibility methods to Layers

* Add locked check in Layers

* Add locked property to Component

* Add rename in LayerManager

* Up layer listeners

* Update layer selection

* Update children counter in ItemView

* Update visibility methods in ItemView

* Add open methods to layers

* Update selection

* Update hover in layers

* Fix layer

* Update TS model in LayerManager

* Layer config TS

* Move ItemView to TS

* Move ItemsView to TS

* Update TS LayerManager

* Update Module and Layers init

* Update layer tests

* Up item view

* Fix color picker update on component select change

* Fix style image preview from parsed CSS. Closes #4362

* Bump eventsource from 1.1.0 to 1.1.1 (#4361)

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](EventSource/eventsource@v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update API docs

* Up Asset doc page

* Up Block doc

* Up component doc

* Up docs

* Inject editor model in Pages

* Update sw visibility command

* Build

* Update layer render

* Build

Co-authored-by: Amberto <amberto.brasil@gmail.com>
Co-authored-by: Alex <ritt.alex@gmail.com>
Co-authored-by: Muhammad Junaid <61476900+m-jojo-s@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ju99ernaut <48953676+Ju99ernaut@users.noreply.github.com>
Co-authored-by: Alex Hoyau <alex@lexoyo.me>
Co-authored-by: Alex Hoyau <a.hoyau@silexlabs.org>
Co-authored-by: Alex Ritter <alex@undo.app>
Co-authored-by: codingaddicted <thenebuchadnezzer@gmail.com>
Co-authored-by: Sigve Hansen <sighan12@gmail.com>
Co-authored-by: Singwai Chan <Singwai.Chan@braze.com>
Co-authored-by: Erik Demaine <edemaine@mit.edu>
Co-authored-by: Vladimír Mlázovský <mlazovla@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant