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

TMS-1033: Add new optional hero-museum component #505

Merged
merged 5 commits into from
May 7, 2024
Merged

TMS-1033: Add new optional hero-museum component #505

merged 5 commits into from
May 7, 2024

Conversation

eebbi
Copy link
Contributor

@eebbi eebbi commented May 6, 2024

Severa-ID: 2108
Severa-kuvaus: TMS-1033 Taidevaltakunta-sivustolle omanlainen heroelementti
Task: https://hiondigital.atlassian.net/browse/TMS-1033

Description

Added museum-theme style hero as an optional component

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@eebbi eebbi requested a review from a team May 6, 2024 06:51
@HPiirainen HPiirainen self-assigned this May 6, 2024
Copy link
Contributor

@HPiirainen HPiirainen left a comment

Choose a reason for hiding this comment

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

Tsekkaa huomiot

@@ -0,0 +1,17 @@
.hero-museum {
height: auto !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
height: auto !important;
height: auto !important;


h1 {
@include from($desktop) {
font-size: 4.41rem !important; // sass-lint:disable-line no-important
Copy link
Contributor

Choose a reason for hiding this comment

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

Pitääkö olla näin spesifi?

Copy link
Contributor

Choose a reason for hiding this comment

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

Tai voisko tän laittaa johonkin muuttujaan edes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tää hero on otettu museosivustojen teemasta, ilmeisesti joskus on päädytty näin spesifiin kokoon ihan tarkoituksella 😅 Muualla tätä kokoa ei ookaan käytössä

@@ -0,0 +1,222 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<?php
<?php

* @return array
* @throws Exception In case of invalid ACF option.
*/
public function get_hero_group_fields( string $key, string $group, array $strings ) : array {
Copy link
Contributor

Choose a reason for hiding this comment

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

Tää vois varmaan olla protected?

@@ -85,21 +89,28 @@ public function sub_fields( $key ) : void {
);

$color_theme_select = ( new Field\Select( $this->strings['color_selection']['title'] ) )
->set_key( $key . '_theme_color' )
->set_key( '{$key}_theme_color' )
Copy link
Contributor

Choose a reason for hiding this comment

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

Tarvii tupla-quotet jos interpoloi stringejä, muuten tää on ihan literal '{$key}_theme_color' 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
->set_key( '{$key}_theme_color' )
->set_key( "{$key}_theme_color" )

Copy link
Contributor Author

@eebbi eebbi May 6, 2024

Choose a reason for hiding this comment

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

tsiisus :D mitenhän tää on edes toiminu tälläsenä testatessa

@@ -0,0 +1,70 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<?php
<?php

/**
* Define formatter name
*/
const NAME = 'HeroMuseum';
Copy link
Contributor

Choose a reason for hiding this comment

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

Käytetäänkö näitä nameja jossain, ja pitääkö tän olla PascalCasella, vai voisko olla hero-museum tms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Samalla mallilla tehty kuin muissakin formattereissa, tätä ei taideta käyttää muualla

* Hooks
*/
public function hooks() : void {
add_filter(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
add_filter(
\add_filter(

@@ -0,0 +1,66 @@
<section {?anchor}id="{anchor|attr}"{/anchor}
class="hero-museum">
Copy link
Contributor

Choose a reason for hiding this comment

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

Ehkä vähän turha rivinvaihto


{?link}
<div class="button-container">
{>"ui/button-link" classes=button_classes icon="chevron-right" icon_classes="icon--medium" /}
Copy link
Contributor

Choose a reason for hiding this comment

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

Pitäiskö tähänki lisätä link=link, kun tuolla alempanakin on? Toimii kyllä ilmankin, mutta olis vähän verbosempi.

@eebbi eebbi merged commit 718257e into master May 7, 2024
1 of 2 checks passed
@eebbi eebbi deleted the TMS-1033 branch May 7, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants