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

Header Detailpage #64 #11

Merged
merged 10 commits into from
May 17, 2024
Merged

Conversation

sannevanseeventer
Copy link
Collaborator

Header Detailpage #64

What does this change? 🚀

Start for the component 'HeaderDetailPage'. This component will eventually be placed at the top of the Detailpage for WOGO. The code currently contains MockData. The component is therefore not yet complete, but I would appreciate receiving feedback on the HTML and CSS.

How Has This Been Tested? ✅

  • User test
  • Accessibility test
  • Performance test
  • Responsive Design test
  • Device test
  • Browser test

The looks 👀

Small screens

Scherm­afbeelding 2024-05-17 om 11 25 30

Large screens

Scherm­afbeelding 2024-05-17 om 11 25 03

How to review 💡

There are a few questions I would appreciate that could help me during a review:

  1. Have the responsive images been applied correctly?
  2. Due to the design of the text in the header, I'm unsure how to handle accessibility for screen readers. How can I ensure that a screen reader reads out the title & subtitle 'Regular Cocktail Walk' without mentioning 'route 1' in between? Or is there a more elegant way to do this?
  3. General comments on how I can improve my code.

Thank you in advance!

Copy link
Member

@ju5tu5 ju5tu5 left a comment

Choose a reason for hiding this comment

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

Nice and very readable code. I've made some remarks so if you can put them in issues then afterwards you can merge this branch.

export let opacity = ''

// Define different image sources for different resolutions or viewport widths
export let Small = 'header-image-small.webp'
Copy link
Member

Choose a reason for hiding this comment

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

Some developers in some languages use capitals for objects. Is there purpose behind the capitals on Small, Medium and Large? If so.. is this set as a rule in the code-standards you use?


<picture>
<!-- Source for small screens -->
<source media="(max-width: 375px)" srcset={Small} />
Copy link
Member

Choose a reason for hiding this comment

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

This is pretty nice but you only serve webp.. what if a browser doesn't support it? A good practice is serving a jpg as fallback next to a couple of different sized webp images..

viewBox="0 0 24 24"
>
<path
stroke="none"
Copy link
Member

Choose a reason for hiding this comment

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

I'm used to setting these in a style element or on the SVG main.

stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 .042a9.992 9.992 0 0 0-9.981 9.98c0 2.57 1.99 6.592 5.915 11.954a5.034 5.034 0 0 0 8.132 0c3.925-5.362 5.915-9.384 5.915-11.954A9.992 9.992 0 0 0 12 .042ZM12 14a4 4 0 1 1 4-4 4 4 0 0 1-4 4Z"
Copy link
Member

Choose a reason for hiding this comment

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

Did you pull this SVG through SVGOMG?

import IconLocation from '../atoms/IconLocation.svelte'

// Mockdata voor de header text
const mockData = [
Copy link
Member

Choose a reason for hiding this comment

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

perfect!


<section class="content-container">
<!-- First content row -->
<div class="title-label">
Copy link
Member

Choose a reason for hiding this comment

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

this <div> could be a <header> element.. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header

</div>

<!-- Second content row -->
<h1 class="subtitle">{mockData[0].subtitle}</h1>
Copy link
Member

Choose a reason for hiding this comment

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

Ony one <h1> element is allowed. I think you want a different heading level here..

import HeaderImage from '../atoms/HeaderImage.svelte'
</script>

<div class="header-container">
Copy link
Member

Choose a reason for hiding this comment

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

That's a lot of nested <div>'s, is this really necessary or can you use a more semantic option instead..

@@ -9,12 +9,12 @@
<kruimelpad parentSlug />
} -->

<div>
<!-- <div>
Copy link
Member

@ju5tu5 ju5tu5 May 17, 2024

Choose a reason for hiding this comment

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

You're allowed to delete this ;)

Copy link
Member

Choose a reason for hiding this comment

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

Did you pull this through SVGOMG?

@ju5tu5 ju5tu5 merged commit 130cb6a into release-candidate May 17, 2024
@sannevanseeventer
Copy link
Collaborator Author

@ju5tu5

Thanks for your feedback! Sorry, I don't understand what you mean by "afterwards you can merge this branch", because you already did or am I confused? And now, do I need to make a new branch to implement those remarks?

Have a nice weekend!

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