magento / magento/community-features

There should be a new additional head block

Open
#321 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
46
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hello together,

there should be a way to call a critical block in the head, as an example head.critical, similar to head.additional

For what would this block:
- For improve the Time to First Draw (TTFD) of the web page like inline css but which is above the CSS files.
- For critical areas which cannot be covered by default_head_blocks, like
- In combination with the use of "Move JS code to the bottom of the page" + "Crtical CSS" there could be scripts in here that are excluded from moving for example

![Ashampoo_Snap_Samstag, 6 März 2021_18h38m53s_026_](https://user-images.githubusercontent.com/16542619/110215711-8b821e80-7eab-11eb-8c3c-14e5d58dc31b.png)

There is no way to customize it via the root template:
![Ashampoo_Snap_Samstag, 6 März 2021_18h40m51s_027_](https://user-images.githubusercontent.com/16542619/110215713-8d4be200-7eab-11eb-9084-658d5b0fbb28.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the root template and trace how head.additional and default_head_blocks are exposed and rendered. Check how the proposed head.critical block should interact with critical CSS and the option to move JavaScript to the bottom. Done means the new block can be customized and produces the requested ordering and exclusions in the page head.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.