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

Pencil Promo block #108 #195

Merged
merged 14 commits into from
Jan 11, 2024
Merged

Conversation

markovukiceviccn
Copy link
Collaborator

@markovukiceviccn markovukiceviccn commented Dec 21, 2023

Fix #108

Banner blocks can be enabled or disabled by changing the data attributes in page word file:

Section Metadata

Pencil banner black | disabled
Pencil banner copper | pencil-banner-copper
Promo block gold | promo-banner-gold
Promo block copper | promo-banner-copper

each block now is independent and Section metadata is no longer needed, but author is responsible to add the proper variant to the block

Also Fix

in All-trucks block had a tiny style issue, that now is fixed

Test URLs:

Copy link
Contributor

aem-code-sync bot commented Dec 21, 2023

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link
Contributor

aem-code-sync bot commented Dec 21, 2023

Page Scores Audits Google
/drafts/marko/v2/all-trucks PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block December 21, 2023 13:32 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block December 22, 2023 10:18 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block December 22, 2023 10:19 Inactive
Copy link
Collaborator

@Lakshmishri Lakshmishri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Min height for this should be removed , it should just have padding like here

Should the component be full width, so if screen is greater than 1440px, there background for entire block ? @cogniSyb , @DanielaPedrochevd ?
Screenshot 2023-12-28 at 16 36 18

For screen size 1200px - 1400px, margin-left: 105px required, so it's aligned with rest of the content in page

Screenshot 2023-12-28 at 16 43 19

blocks/v2-pencil-promo/v2-pencil-promo.js Outdated Show resolved Hide resolved
blocks/v2-pencil-promo/v2-pencil-promo.js Outdated Show resolved Hide resolved
@cogniSyb cogniSyb added the FR Functional requirement label Jan 2, 2024
@cogniSyb cogniSyb changed the title 108 pencil promo block Pencil Promo block #108 Jan 2, 2024
@SantiagoHomps-NC
Copy link
Contributor

IDK if this is regarding this issue but since the block is on this page I found it and could be solved. There is a small gap in the images of the 'all-trucks' block when hovered. This could be solved by deleting line 288 (align-items property) from 'v2-all-trucks.css' file.
Screenshot 2024-01-02 at 16 43 10

@cogniSyb
Copy link
Collaborator

cogniSyb commented Jan 3, 2024

Min height for this should be removed , it should just have padding like here

Should the component be full width, so if screen is greater than 1440px, there background for entire block ? @cogniSyb , @DanielaPedrochevd ?
The component should be full width indeed

blocks/v2-pencil-promo/v2-pencil-promo.css Outdated Show resolved Hide resolved
background: var(--c-primary-gold);
}

.v2-pencil-promo__promo-banner .icon-arrow-right svg {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use .icon instead of .icon-arrow-right

}

.v2-pencil-promo__pencil-banner .v2-pencil-promo__content {
width: 45%;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 512px, which is 1040/2 - 16px gutter

/* Pencil banner styles */
.v2-pencil-promo__pencil-banner .v2-pencil-promo__content {
background: var(--c-primary-black);
min-height: 147px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all the min-height


.v2-pencil-promo__pencil-banner .v2-pencil-promo__content p {
display: inline;
font: 1.5625rem/117% var(--ff-body);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be --ff-subheadings-medium instead

@media (min-width: 1200px) {
.v2-pencil-promo__pencil-banner {
max-width: 1440px;
margin: 20px auto;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn’t have margin here

[data-pencil-banner-black = 'disabled'] .v2-pencil-promo--pencil-banner-black,
[data-pencil-banner-copper = 'disabled'] .v2-pencil-promo--pencil-banner-copper,
[data-promo-block-gold = 'disabled'] .v2-pencil-promo--promo-banner-gold,
[data-promo-block-copper = 'disabled'] .v2-pencil-promo--pencil-banner-copper {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t see the use of the data attributes right now. I think that the following acceptance criterium caused a bit of confusion:

As an editor I can select between the four variants (black and copper pencil banners or the promo block copper or gold).

text-decoration-color: var(--c-primary-white);
}

.v2-pencil-promo--pencil-banner-copper .v2-pencil-promo__content a:hover {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hover state should be activated when hovering the entire block, as it is entirely clickable.

min-height: 76px;
padding: 12px 16px;
margin: 0 76px 0 0;
font: var(--headline-5-font-size)/var(--headline-5-line-height) var(--ff-body);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be --ff-subheadings-medium instead. The font-size should be bigger on desktop


/* Generic block styles */
.v2-pencil-promo {
margin: 20px 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn’t have margin here, only for the variant with an image

@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block January 5, 2024 13:31 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block January 5, 2024 13:34 Inactive

.v2-pencil-promo__pencil-banner .v2-pencil-promo__content {
width: 512px;
margin-left: 200px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove margin-left

background: var(--c-accent-copper);
}

.v2-pencil-promo--pencil-banner-black .v2-pencil-promo__content-wrapper {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this declaration block

}

@media (min-width: 1200px) {
.v2-pencil-promo__pencil-banner .v2-pencil-promo__content-wrapper {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this declaration block

}

/* Pencil banner styles */
.v2-pencil-promo__pencil-banner .v2-pencil-promo__content {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove .v2-pencil-promo__content from selector and put padding: 30px 16px; in its own declaration block with .v2-pencil-promo__pencil-banner .v2-pencil-promo__content as selector.

/* Pencil banner styles */
.v2-pencil-promo__pencil-banner .v2-pencil-promo__content {
background: var(--c-primary-black);
color: var(--c-primary-white);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utilise --text-color here


/* stylelint-disable-next-line no-descending-specificity */
.v2-pencil-promo--pencil-banner-copper .v2-pencil-promo__content a {
text-decoration-color: var(--c-primary-white);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use var(--text-color);

}

.v2-pencil-promo__promo-banner .icon svg {
--color-icon: var(--c-primary-white);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use var(--text-color);

height: 24px;
}

.v2-pencil-promo--promo-banner-copper .icon-arrow-right {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change .icon-arrow-right into .icon

}

.v2-pencil-promo__promo-banner .v2-pencil-promo__content,
.v2-pencil-promo__promo-banner .v2-pencil-promo__content p {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this selector as you’re moving the background-color to a different selector

blocks/v2-pencil-promo/v2-pencil-promo.css Show resolved Hide resolved
@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block January 9, 2024 07:41 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block January 11, 2024 09:18 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to 108-pencil-promo-block January 11, 2024 09:20 Inactive
@jonatan-lledo-netcentric jonatan-lledo-netcentric merged commit c47c28f into develop Jan 11, 2024
2 checks passed
manuel-vara added a commit that referenced this pull request Jan 31, 2024
* Update fstab.yaml for redesign

* change url and sharepoint to upstream urls

* Inpage navigation is in reversed order on Firefox #173 (#178)

* fix Firefox issue with sorting
* fix naming issues
* refactor focus state, button styles
* fix overlap issue

* Hero V2 Block displays different images for mobile and desktop. #106 (#179)

* refactor naming structure
* refactor adaptive images mechanism

* Icon cards block (#181)

* #509 Fix displaying header on dealer page

* fix done

* one trust position ix

* Embed block match NZ one

* Update feed.xml

* Fix createElement()  v1-Cards

* Update feed.xml

* Update release.yml

* columns block adapted

* icon cards working

* css clean

* adjustements

* last changes

* specific class

* btn state styling

* comments corrected

* secondary btn margin corrected

* secondary btn class added

* cleanup

---------

Co-authored-by: Tomasz Dziezyk <[email protected]>
Co-authored-by: TomaszDziezykNetcentric <[email protected]>
Co-authored-by: Jonatan Lledo <[email protected]>
Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: Syb <[email protected]>

* The pop-up of the video displayed clicking on the Play video button is smaller and the thumbnail is cutout #182 (#183)

* iPhone/iPad - Icon Cards - The local video in the video pop-up cannot be played and is incorrectly displayed #184 (#185)

* fix #184: use <video> tag for video in modal
* fix modal close button
* fix override fullscreen play for safari
* refactor setting attributes

* Opening up Images will display an incorrect default state on the Image grid carousel #169 (#193)

* Hero variant for Solutions page #45 (#197)

* hero variants added

* refactored changes to alltrucks block

* comments addressed

* color confusion

* make btn color always white

* button style refactor

* margin solved

* pdp edge cases

* Tabbed Carousel variant for wheelbase #190 (#196)

* add new variant for tabbed carousel
* 190 fadeIn effect with no scroll
* 190 Fix line more than 100 chars
* 190 fix index overflow
* Figcap conditional add, default color & tab items wider
* list style none & setCarousel index-1 too

---------

Co-authored-by: Jonatan Lledo <[email protected]>

* Pencil Promo block #108 (#195)

* #108 - Pencil promo and banner promo block

* #108 - Add cursor: pointer to the block

* #108 - Add pencil banner links styles

* #108 - Change link hover color to acheive better contrast

* Applied comments & each block cares by itself only

* fixed alignment issue in line 288

* fix lint issue

* Fix an issue if p Element is not present inside content

* Style issues fix

* remove an unnecessary search for h1 & its styling

* move the hover effect 1 level up & a bit of code clean up

---------

Co-authored-by: Jonatan Lledo <[email protected]>

* fix alignment, add hover and focus state

* V2 Columns Block variation #133 (#186)


---------

Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: Lakshmishri <[email protected]>
Co-authored-by: Syb Wartna <[email protected]>

* Add "My Assets" functionality #201 (#202)

* add my assets to sidekick
* add custom viewport configurations for sidekick library

* Powertrain V2 Slider Block #147 (#200)

* add block
* add new section background color

---------

Co-authored-by: Syb <[email protected]>
Co-authored-by: Syb Wartna <[email protected]>
Co-authored-by: SantiagoHomps-NC <[email protected]>
Co-authored-by: Tomasz Dziezyk <[email protected]>
Co-authored-by: TomaszDziezykNetcentric <[email protected]>
Co-authored-by: Jonatan Lledo <[email protected]>
Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: taimurCognizant <[email protected]>
Co-authored-by: Lakshmishri <[email protected]>
Co-authored-by: Marko Vukićević <[email protected]>
cogniSyb added a commit that referenced this pull request Feb 26, 2024
* change url and sharepoint to upstream urls

* Release 4 (#211)

* Update fstab.yaml for redesign

* change url and sharepoint to upstream urls

* Inpage navigation is in reversed order on Firefox #173 (#178)

* fix Firefox issue with sorting
* fix naming issues
* refactor focus state, button styles
* fix overlap issue

* Hero V2 Block displays different images for mobile and desktop. #106 (#179)

* refactor naming structure
* refactor adaptive images mechanism

* Icon cards block (#181)

* #509 Fix displaying header on dealer page

* fix done

* one trust position ix

* Embed block match NZ one

* Update feed.xml

* Fix createElement()  v1-Cards

* Update feed.xml

* Update release.yml

* columns block adapted

* icon cards working

* css clean

* adjustements

* last changes

* specific class

* btn state styling

* comments corrected

* secondary btn margin corrected

* secondary btn class added

* cleanup

---------

Co-authored-by: Tomasz Dziezyk <[email protected]>
Co-authored-by: TomaszDziezykNetcentric <[email protected]>
Co-authored-by: Jonatan Lledo <[email protected]>
Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: Syb <[email protected]>

* The pop-up of the video displayed clicking on the Play video button is smaller and the thumbnail is cutout #182 (#183)

* iPhone/iPad - Icon Cards - The local video in the video pop-up cannot be played and is incorrectly displayed #184 (#185)

* fix #184: use <video> tag for video in modal
* fix modal close button
* fix override fullscreen play for safari
* refactor setting attributes

* Opening up Images will display an incorrect default state on the Image grid carousel #169 (#193)

* Hero variant for Solutions page #45 (#197)

* hero variants added

* refactored changes to alltrucks block

* comments addressed

* color confusion

* make btn color always white

* button style refactor

* margin solved

* pdp edge cases

* Tabbed Carousel variant for wheelbase #190 (#196)

* add new variant for tabbed carousel
* 190 fadeIn effect with no scroll
* 190 Fix line more than 100 chars
* 190 fix index overflow
* Figcap conditional add, default color & tab items wider
* list style none & setCarousel index-1 too

---------

Co-authored-by: Jonatan Lledo <[email protected]>

* Pencil Promo block #108 (#195)

* #108 - Pencil promo and banner promo block

* #108 - Add cursor: pointer to the block

* #108 - Add pencil banner links styles

* #108 - Change link hover color to acheive better contrast

* Applied comments & each block cares by itself only

* fixed alignment issue in line 288

* fix lint issue

* Fix an issue if p Element is not present inside content

* Style issues fix

* remove an unnecessary search for h1 & its styling

* move the hover effect 1 level up & a bit of code clean up

---------

Co-authored-by: Jonatan Lledo <[email protected]>

* fix alignment, add hover and focus state

* V2 Columns Block variation #133 (#186)


---------

Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: Lakshmishri <[email protected]>
Co-authored-by: Syb Wartna <[email protected]>

* Add "My Assets" functionality #201 (#202)

* add my assets to sidekick
* add custom viewport configurations for sidekick library

* Powertrain V2 Slider Block #147 (#200)

* add block
* add new section background color

---------

Co-authored-by: Syb <[email protected]>
Co-authored-by: Syb Wartna <[email protected]>
Co-authored-by: SantiagoHomps-NC <[email protected]>
Co-authored-by: Tomasz Dziezyk <[email protected]>
Co-authored-by: TomaszDziezykNetcentric <[email protected]>
Co-authored-by: Jonatan Lledo <[email protected]>
Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: taimurCognizant <[email protected]>
Co-authored-by: Lakshmishri <[email protected]>
Co-authored-by: Marko Vukićević <[email protected]>

* change url and sharepoint to upstream urls

---------

Co-authored-by: Syb Wartna <[email protected]>
Co-authored-by: Lakshmishri <[email protected]>
Co-authored-by: Syb <[email protected]>
Co-authored-by: SantiagoHomps-NC <[email protected]>
Co-authored-by: Tomasz Dziezyk <[email protected]>
Co-authored-by: TomaszDziezykNetcentric <[email protected]>
Co-authored-by: Jonatan Lledo <[email protected]>
Co-authored-by: aem-code-sync[bot] <aem-code-sync[bot]@users.noreply.github.com>
Co-authored-by: taimurCognizant <[email protected]>
Co-authored-by: Marko Vukićević <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR Functional requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants