Closed (fixed)
Project:
Paragraphs Gridstack
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Nov 2022 at 20:03 UTC
Updated:
11 Feb 2023 at 10:59 UTC
Jump to comment: Most recent
Comments
Comment #2
smovs commentedComment #4
smovs commentedHi Panchuk, Could you please review my MR?
There are some updates:
1. I removed the creation of the breakpoints buttons from the JS file and moved that to GridstackContainer.php. The buttons will be created dynamically by breakpoint quantity (a button for each breakpoint). Also, I added some common styles for these buttons and for textarea inputs. These styles will be used in JS.
2. I updated the JS code in the module. I used drupalSettings with breakpoints for the breakpoint buttons click event and updated click events for the Restore settings and Set by template buttons.
3. I have found that the gridstack.js library is changed its own repositories. Attaching the gridstack.js library by composer is not working correctly at this moment. The folder 'dist' will not be installed by this method. Also, the file "gridstack-h5.js" exists in gristack v.5.1.1 and doesn't exist in v.1.2.1. I installed gridstack.js library by yarn (yarn add gridstack@5.1.1) and moved the folder with gridstack manually to libraries folder. After that, I updated the path to the file, and scripts from the library are available in the file paragraphs_gridstack.js.
My next steps will be refactoring the JS file and using dynamically created breakpoint buttons for rendering the related Gridctack area.
Comment #5
panchukComment #6
smovs commentedHi @Panchuk.
I have a bit refactored the GridstackContainer.php. I added the usage of a dynamic breakpoint label instead hardcoded.
Could you please look at my last MR? Thanks.
Comment #7
smovs commentedComment #8
panchukCannot merge MR due to conflicts, please, solve them before
Comment #9
smovs commentedComment #11
panchuk