Blender-org web-assets v2 upgrade #104116
No reviewers
Labels
No Label
legacy module
Rendering & Cycles
legacy module
User Interface
legacy project
Cycles
legacy project
Documentation
legacy project
Infrastructure: blender.org
legacy project
Infrastructure: Blender Web Assets
legacy project
Infrastructure: Websites
legacy project
User Interface
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/blender-org#104116
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "web-assets-v2-upgrade"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request upgrades Git submodule Web Assets to v2, resolves post-upgrade issues, and makes the necessary project-specific changes.
Web Assets v2 brings UI fixes, improvements, and new development features to the platform as detailed on the Web Assets v2 guidelines and notes wiki page.
Visual changes are kept to a minimum and will be added later in a dedicate design pass.
Important: Upgrading to Web Assets v2 doesn't end with merging the pull request, as some styling lives in the database. Follow the Web Assets upgrade wiki guide's according section to make the database changes. A helper file part-helper-bwa-wp-search-and-replace.php is also prepared to accelerate the process.
A list of tasklists to change and fix on the theme level, as discussed IRL.
Another list of todos to change and fix on the database level, after the PR has been merged and deployed.
All todos are organized by occurence. Theme-level todos are listed with checkmarks.
General pages
Releases pages
4.1
Create style utility helper
.wp-style-global-content-size-100
Add section Making waves style inline
--wp--style--global--content-size
> 100%Recover block in section Audio waveform
4.0
Fix PHP fatal error
Set.has-text-align-center
max-width to 600pxSet.wp-block-group
width to 100%Set.has-text-align-center
and.wp-block-heading
width to 100%Set.is-vertical
and.wp-block-group
styleflex-direction
to columnCheck section
video-scroll
blockFix section DIY tools
strong
tagSet
.typetosearchtext
inline stylefont-size
3rem to 1.6x3.6 LTS
3.5
Revert
.wp-block-paragraph-plus
ruleline-height
to 1emAdd section #hair style inline
--wp--style--global--content-size
> 100%3.4
3.3 LTS
.wp-block-paragraph-plus
ruleline-height
to 1em.wp-block-paragraph-plus
Light & section light & shadow line-heights3.0
2.91
A further list of todos to change and fix on the database level, after the PR has been merged and deployed.
General pages
Thanks
/thanks/?dev=true
Releases pages
<= 3.4
iframe
s for YouTube embedsWIP: blender-org web-assets v2 upgradeto Blender-org web-assets v2 upgrade@ -30,6 +30,13 @@ if( !empty($block['align']) ) {
$className .= ' float-' . $block['align'];
}
// Remove class "cards" from $className to apply "cards" on child wrapping element only.
This whole section is about removing "cards" from $className. This gets added in line 15, you could also go there and rename it or not add it in the first place.
The
$className
is used to render various classes on the parent element within thecards
template based on Gutenberg editor settings. I'm not sure we can test all possibilities, but rendering$className
on the parent's class attribute seems important to keep. I think removing line 15$className = $className[1];
would break it, as the latter converts the array to an actual string.cards is a reserved classname in BWA v2, and mustn't be present on the outer wrapper element that is needed here. Based on these, I think the substring replacement is needed for not to accidentally break some other settings I'm not aware of. 🤔
@ -46,3 +46,3 @@
/*
* - If the page/post has_post_thumbnail, set $header_image_src as background-image url
* - If the page/post has_post_thumbnail, set $header_image_src as background-img url
I don't think this is an intended rename since it is a CSS property.
@ -477,21 +477,24 @@ $is_latest = (($version_number >= $current_version_number) ? true : false);
<?php endwhile; // end of the loop. ?>
<?php
// TODO: cleanup function definition and call 'js_footer' if is not needed
I don't see how this relates to v2? I don't think we change any JavaScript other than renaming some classes.
There were some PHP fatal errors happening on the local dev server, likely because of the less permissive PHP error handling, and minor PHP config differences on localhost. (It's just a coincidence that it relates to JavaScript, as the rendered markup broke while calling / working with JS functions.) These changes are related to resolving these issues, which likely exist in production without causing problems. Added todos are for possible JS refactors I noticed while working on the latter.
See #79b158d
@ -2,0 +4,4 @@
+media-sm
--fs-xl: 5.6rem
$page-card-icon-size: 7.8rem
Can this be a CSS variable instead of Sass?
@ -417,0 +431,4 @@
font-size: var(--fs-h4)
details
@extend .box
I don't think we need this anymore? We've got _details.sass in web-assets.
We currently use
details
on e.g. System Requirements page on blender.org (and on other pages with a similar look). As details blocks are top level blocks that are displayed as other boxes on the page, this is a way to keep current styling on the theme level, without introducing the need for database-level content changes.Alternatively we can remove style overrides from the theme, and make content changes in the Gutenberg editor (by adding grouping elements with the
box
class). I'd suggest to keep it like this, and apply content changes and do styles' cleanup in a next iteration.@ -41,3 +41,3 @@
/* In the editor, make text visible in textarea when editing HTML. */
[class$="block-html-textarea"]
[class$="block-htms-textarea"]
Is this an intended change?
html
->htms
?@ -7,3 +7,2 @@
$header-background-blursize: 15px
&-background
$header-bg-blursize: 1.8rem
This could be a CSS variable too.
@pablovazquez thank you for the review!
I made the fixes, and added some comments on items that raised some questions or needed explanation.
Thanks for the fixes! It's hard to test without the proper db so let's go with it and be around to fix whatever comes up :D
Congrats @martonlente on such a massive milestone! 🚀