TODO

Useful links:

Contents:


TODO: ACTUAL

See TODO in each block page: https://agnostic-fse-com-gl-en.wpe-dev.bacardi.digital/blocks/

Add button to export block styles as json file

Then this json code will be added to the theme itself to save current block styles – it needed as bacjup and usefull when theme sets up on one env and them moved to another.

Find way to register block style variation

If we register block style variation via register_block_style(), the variation only appeare in regular editor and not apear in site style editor.

Find correct hook

Bug

SEO Framework

Set default settings on plugin first activation. Use hook – check is settings already exists if not specify NWP related settings for the first time. It needed to not configure the plugin each time for the NWP.

Fix OT-Autoblock

iframe video not works src attr changes

iframe src changed to data-src and not work

Rename all blocks css params (props) [P1]

add css_ prefix to all blocks params that related to css variables.

Use another lib for images Lazy-Load [P2]

https://atlassian-bacardi.atlassian.net/browse/DXP-2503

Add block: simple “article-text” [P1]

Ticket:
https://atlassian-bacardi.atlassian.net/browse/DXP-2502


This block will be a simple wrapper for formated text when we need write text like here: https://www.bacardi.com/culture/mojito-moments/

Text with headings, paragraph etc. when we need margins for text.

Move required code [P3]

From core (plugin) & core-gutenberg (theme)

FAQ Block settings:[P5]

Add options: first answer open, all closed, all open

Add a button in the admin bar to open the site editor in the admin (for convenience) [P5]

Also add an “edit page in editor” button under “Edit Page” (for convenience)

http://agnostic-fse-com-gl-en.wpe-dev.bacardi.digital/wp-admin/site-editor.php?p=%2Fpage&layout=list&activeView=published&postId=248&canvas=edit

Create a page for writing global styles, accessible only to a selected group of developers [P3]

Disable auto-activated plugins that are not needed for FSE:

action-scheduler

Collect all inline block styles into a file [P5]

Load it at the top, in the header. Currently a lot of styles are just inline.

Remove adding default WP CSS variables into HTML: [P5]

--wp--preset--spacing--20
--wp--preset--spacing--30
--wp--preset--spacing--40
--wp--preset--spacing--50
--wp--preset--spacing--60
--wp--preset--spacing--70
--wp--preset--spacing--80

--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: null;
--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: null;
--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: null;
--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: null;
--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: null;
--wp--preset--gradient--cool-to-warm-spectrum: null;
--wp--preset--gradient--blush-light-purple: null;
--wp--preset--gradient--blush-bordeaux: null;
--wp--preset--gradient--luminous-dusk: null;
--wp--preset--gradient--pale-ocean: null;
--wp--preset--gradient--electric-grass: null;

--wp--preset--color--black: null;
--wp--preset--color--cyan-bluish-gray: null;
--wp--preset--color--white: null;
--wp--preset--color--pale-pink: null;
--wp--preset--color--vivid-red: null;
--wp--preset--color--luminous-vivid-orange: null;
--wp--preset--color--luminous-vivid-amber: null;
--wp--preset--color--light-green-cyan: null;
--wp--preset--color--vivid-green-cyan: null;
--wp--preset--color--pale-cyan-blue: null;
--wp--preset--color--vivid-cyan-blue: null;
--wp--preset--color--vivid-purple: null;

--wp--preset--font-size--small: null;
--wp--preset--font-size--medium: null;
--wp--preset--font-size--large: null;
--wp--preset--font-size--x-large: null;

Disable the “Apply globally” button in block Advanced settings in the block editor [P5]

“Apply this block’s typography, spacing, dimensions, and color styles to all Split (nwp) blocks.”

Think through and configure which default blocks should be disabled[P6]

For example, “Media & Text” might be worth keeping because it may be useful. Disabling is done in: platform/wp-content/themes/core-fse/auto-include/allowed-block-types.php

Extract anchor integration from the cover block into a separate block![P10]

Figure out how to automatically pass variables into props based on variable (attribute) name[P4]

For example, if an attribute starts with cssvar_. Find a unified way to add CSS variable settings to blocks. Approach: we add a block attribute --media-width and it automatically appears in the block’s style attributes via get_block_wrapper_attributes() and blockProps in React. If this is not done, there will be a lot of repetitive code across blocks to output these parameters.

Create a convenient button to export theme.json [P6]

and export template patterns (header, footer, etc.) so that the code can be updated locally by one click.

Create controlled access to global styles settings[P10]

Only for selected users – via a specific new permission.

Fix block preview [P10]

We need clear previews when hovering over blocks in the admin.

On the agnostic site page into the block description, under the name add description with agnostic block page Link

Create an “Inline SVG” block [P4]

This block should allow inserting custom SVG code into HTML. It must have many settings. As a reference, take the block from SaveSVG plugin – it adds a similar block but with very limited settings. Remove the SaveSVG plugin block!

Add ability to choose shown image part in Split Block (DONE)

Image crop solution: Hint worth checking: <FocalPointPicker> component, right now we only have adding image for desktop…mobile, without any image customization

https://atlassian-bacardi.atlassian.net/browse/DXP-2419

We need a block that can make any block or group of blocks clickable. Possibly this plugin can be used as a base: https://wordpress.org/plugins/advanced-link-block/

Починить ошибку в консоли “waitForKeyElements” – https://agnostic-fse-com-gl-en.wpe-dev.bacardi.digital/wp-content/plugins/nwp-gutenberg-blocks/blocks/vimeo/block.js этот скрипт требует либу, которой нет…

Перенести подключение скрипта “player.vimeo.com”

Заранее регать и где нужно включать в очередь, для блоков через block.json. Отрефакторить везде, где он есть в коде.

Создать блок “Inline SVG”

Блок позволяеть вставить кастомный SVG код в HTML. Должен иметь кучу разных настроек. За пример можно взять блок из плагина SaveSVG он добавлят аналогичный блок – только у него очень скудный набор настроек. Блок от плагина SaveSVG нужно удалить!

Нам нужен блок который позволит сделать кликабельным любой другой блок или группу блоков. Возможно этот можно взять за основу: https://wordpress.org/plugins/advanced-link-block/

DONE

  • (DONE) Build nwp-fse-blocks plugin on deploy stage And remove min (build) files from GIT. [P2]
  • (DONE) Bring all classes and names in new blocks to a unified style. Classes must not conflict with existing ACF blocks. I propose using the prefix nblock instead of block-
  • (DONE) Rewrite the split block using native block code.
  • (DONE) Clean up the primitives file – remove unnecessary things, keep only what is needed.
  • (DONE) For the cover block, figure out how to set the height through the admin.
  • (DONE) For the split block, figure out how to set the image width. If needed, add a setting.
  • (DONE) Saved images do not work because of Offload Media. We need to store only the ID and get the URL on the fly both on frontend and backend.
  • (DONE) Hide header menu blocks on all templates except the header template, so they do not interfere when editing another template.
  • Slider block
    • (DONE) Add the ability to set the gap between slides, and add vertical alignment options to slider-item blocks.
    • (DONE) Add Swiper options, at minimum the freeMode option.
  • (DONE – handled by using variables in values) Bug: cannot select font size edge-x.
  • (DONE) Remove the possibility to unlock blocks that were locked.
  • (DONE) Removed Vimeo settings entirely from the split block.
  • (DONE – irrelevant, not added in the new implementation) Block: Why is Vimeo video inside the split block? Visually it is just shown as fullscreen video, unrelated to split. Also does not work on V4. I created a split block on new Dewars /gl/en, inserted a Vimeo video https://vimeo.com/457907557 and nothing shows. Need to understand the purpose and reason.
  • (DONE) Rewrite the gulpfile.js builder for native blocks. The JS bundle size is huge…
  • (DONE) Analyze whether we can use core blocks like cover, split: If we can, then use only them; if not, disable them and create our own equivalents.
  • (DONE) Move loading of the “player.vimeo.com” script. Register it in advance and enqueue where needed, via block.json. Refactor everywhere it appears.

NO SENSE

  • (NO-SENSE) When creating an existing ACF block separately (a copy for the new version), the question arises how to handle certain functionality in the block (for example, anchor integration). Both the old and new block will simply contain the same code. DRY is broken!
  • (NO-SENSE. DONE – just removed this code, need to recheck everything is fine) Remove duplicated styles. plugins\nwp-gutenberg-blocks\includes\critical-css.php adds block styles and the block itself adds its own styles when registered via block.json (removed).
  • (NO-SENSE) Review changes in core-gutenberg. The theme must not conflict with v5. If the changes are significant, then probably it’s better to create a new parent theme for v5 to avoid touching legacy. Think about this…
  • (NO-SENSE – we do everything separately) We will need to check all changes of the “nwp-gutenberg-blocks” plugin and separate them somehow so that the V4 platform does not break.
  • (NO-SENSE – we do everything separately) We will need to check all changes of the “core-gutenberg” theme and separate them somehow so that the V4 platform does not break.
  • (NO-SENSE – we do everything separately) Remove unnecessary things from the base theme settings themes\core-gutenberg\includes, for example social-links.php seems unnecessary for FSE. Also there is footer-bottom-content.php, which will probably be needed for FSE.
  • (NO-SENSE – we do everything separately) Check and configure theme.json in the core-gutenberg theme. Because “If the child theme has a theme.json, WordPress merges both files: the child overrides matching values, and everything else is inherited from the parent.”
  • (NO-SENSE – we do everything separately) Remove “Theme Settings” from “core-gutenberg” or better create a new “core-fse” theme for new sites.
  • (NO-SENSE) For v5 we need to disable the “nwp-gutenberg-blocks” plugin. And possibly make a similar replacement instead of it.
  • (NO-SENSE) Move themes\dewars-fse\gutenberg-blocks into a separate plugin and continue developing blocks there.