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

[Feature] Add a hero component #99

Merged
merged 24 commits into from
Jan 20, 2023
Merged

Conversation

Liax
Copy link
Contributor

@Liax Liax commented Nov 22, 2022

Objective
First draft of a hero component

To do:

  • Add a slider option
  • ACF blocks from the starter project ?
    ...
  • Add documentations

@Liax Liax added the enhancement New feature or request label Nov 22, 2022
@github-actions
Copy link

github-actions bot commented Nov 22, 2022

Export Size

Unchanged

@studiometa/ui

Name Size Diff
AbstractPrefetch 411 B -
AbstractScrollAnimation 461 B -
AbstractSliderChild 2.38 kB -
Accordion 1.06 kB -
AccordionItem 1.02 kB -
ALL 10.55 kB -
AnchorScrollTo 243 B -
animationScrollWithEase 272 B -
ATOMS 3.26 kB -
Cursor 665 B -
Draggable 327 B -
Figure 707 B -
FigureTwicpics 1.02 kB -
Frame 1.62 kB -
FrameAnchor 201 B -
FrameForm 198 B -
FrameTarget 777 B -
LargeText 492 B -
LazyInclude 418 B -
Menu 1.38 kB -
MenuBtn 230 B -
MenuList 943 B -
Modal 908 B -
ModalWithTransition 1.02 kB -
MOLECULES 6.8 kB -
ORGANISMS 1.68 kB -
Panel 1.26 kB -
PrefetchWhenOver 468 B -
PrefetchWhenVisible 480 B -
PRIMITIVES 632 B -
ScrollAnimation 513 B -
ScrollAnimationChild 650 B -
ScrollAnimationChildWithEase 851 B -
ScrollAnimationParent 712 B -
ScrollAnimationWithEase 711 B -
ScrollReveal 622 B -
Sentinel 217 B -
Slider 2.19 kB -
SliderBtn 2.56 kB -
SliderCount 2.41 kB -
SliderDots 2.63 kB -
SliderDrag 353 B -
SliderItem 678 B -
SliderProgress 2.46 kB -
Sticky 859 B -
TableOfContent 647 B -
TableOfContentAnchor 460 B -
Tabs 625 B -
Transition 387 B -

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #99 (c7a8ec3) into develop (2934b32) will decrease coverage by 0.10%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop      #99      +/-   ##
===========================================
- Coverage    26.64%   26.55%   -0.10%     
===========================================
  Files           46       46              
  Lines         1141     1145       +4     
  Branches       211      214       +3     
===========================================
  Hits           304      304              
- Misses         771      775       +4     
  Partials        66       66              
Flag Coverage Δ
unittests 26.55% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/ui/molecules/Slider/SliderBtn.ts 5.26% <0.00%> (-1.88%) ⬇️
packages/ui/atoms/Cursor/Cursor.ts 100.00% <0.00%> (ø)
packages/ui/atoms/Figure/Figure.ts 3.70% <0.00%> (ø)
packages/ui/molecules/Modal/Modal.ts 95.94% <0.00%> (ø)
packages/ui/molecules/Slider/Slider.ts 0.60% <0.00%> (ø)
packages/ui/atoms/LargeText/LargeText.ts 4.16% <0.00%> (ø)
packages/ui/decorators/withTransition.ts 20.00% <0.00%> (ø)
packages/ui/molecules/Slider/SliderCount.ts 33.33% <0.00%> (ø)
packages/ui/atoms/LazyInclude/LazyInclude.ts 4.76% <0.00%> (ø)
packages/ui/atoms/Prefetch/AbstractPrefetch.ts 3.57% <0.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link

@Guilm Guilm left a comment

Choose a reason for hiding this comment

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

Nice first draft !

packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
@perruche
Copy link
Contributor

perruche commented Dec 8, 2022

suggestion Add a block to insert breadcrumbs

…tes instead of just classes. Add conditions to the elements. Add the figure componant. Add the possibility to have mutliple CTA
Copy link
Contributor

@titouanmathis titouanmathis left a comment

Choose a reason for hiding this comment

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

Hey @Liax, great job on the update!

Note: don't be overwhelmed by the multiple comments I left, this component is looking really good and promising 👍

packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/molecules/Hero/Hero.twig Outdated Show resolved Hide resolved
@Liax Liax requested review from titouanmathis, Guilm and perruche and removed request for Guilm January 2, 2023 16:01
packages/ui/organisms/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/organisms/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/organisms/Hero/Hero.twig Outdated Show resolved Hide resolved
packages/ui/organisms/Hero/Hero.twig Outdated Show resolved Hide resolved
@Liax Liax marked this pull request as ready for review January 9, 2023 13:38
@titouanmathis titouanmathis changed the title Feature/ hero component [Feature] Add a hero component Jan 11, 2023
{ class: ['hero__image'] }
)
})
%}
Copy link

Choose a reason for hiding this comment

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

we need some additionnal params, see below :

{% set image =
  image
    |default({})
    |merge({
      src: image.src,
      width: image.width,
      height: image.height,
      alt: image.alt,
      attr: merge_html_attributes(
        image.attr ?? null,
        { class: 'absolute inset-0' },
        { class: 'hero__image' }
      )
    })
%}

Copy link
Contributor

@titouanmathis titouanmathis left a comment

Choose a reason for hiding this comment

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

One small adjustment to the CHANGELOG and we will be able to merge this! Well done @Liax!

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@titouanmathis titouanmathis left a comment

Choose a reason for hiding this comment

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

👏

@titouanmathis titouanmathis merged commit 3d6fa54 into develop Jan 20, 2023
@titouanmathis titouanmathis deleted the feature/hero-component branch February 8, 2023 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants