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

feat(styles): update Calendar component - Horizon 2023 #4514

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

droshev
Copy link
Contributor

@droshev droshev commented May 8, 2023

Related Issue

Closes #4369

Description

Update Calendar and Date Picker with the latest Horizon specs

BREAKING CHANGE:
complete calendar markup refactoring(item, navigation, legend). Many classes were removed.

Navigation
Before:

<header class="fd-calendar__header">
    <div class="fd-calendar__navigation">
...
    </div>
</header>

After:

<header class="fd-calendar__navigation">
...
</header>

Calendar Day
Before:

<td role="gridcell" class="fd-calendar__item">
    <span class="fd-calendar__text" role="button">8</span>
</td>

After:

<td role="gridcell" class="fd-calendar__item">
    <div class="fd-calendar__text-wrapper">
        <span class="fd-calendar__text" role="button">8</span>
    </div>
</td>

Calendar Container
Before:

<div class="fd-calendar__content fd-calendar__content--dates" id="IO0cp341">
    <table class="fd-calendar__table" role="grid">
        <thead class="fd-calendar__group">
...
    </table>
</div>

After:

<table class="fd-calendar__content" id="IO0cp341" role="grid">
    <thead class="fd-calendar__group">
...
</table

@droshev droshev added the Horizon 2023 Horizon Design Changes in 2023 label May 8, 2023
@droshev droshev added this to the Sprint 112 milestone May 8, 2023
@droshev droshev self-assigned this May 8, 2023
@droshev droshev mentioned this pull request May 8, 2023
58 tasks
@netlify
Copy link

netlify bot commented May 8, 2023

Deploy Preview for fundamental-styles ready!

Name Link
🔨 Latest commit 400a25b
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-styles/deploys/6491ee547a67c40008602085
😎 Deploy Preview https://deploy-preview-4514--fundamental-styles.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@InnaAtanasova InnaAtanasova left a comment

Choose a reason for hiding this comment

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

  1. The focus outline should be on top of the special day indicator. Maybe use z-index.

Screenshot 2023-05-08 at 4 13 10 PM

  1. Wrong BEM in my opinion in this case:
fd-calendar__item fd-calendar__item--weekend fd-calendar__item--current is-active fd-calendar__special-day--1

The block is fd-calendar__item and the following modifier classes modify the default behaviour: fd-calendar__item--weekend and fd-calendar__item--current, but the class fd-calendar__special-day--1 is not used properly. Here are the problems:

  • fd-calendar__special-day--1 is a block and can't be used together with another block (in this case fd-calendar__item
  • you need fd-calendar__special-day to have the fd-calendar__special-day--1
    But in general, I wouldn't use 2 block classes on the same element

The code is in "Days" example
Screenshot 2023-05-08 at 4 19 56 PM

  1. Related to the above comment:
fd-calendar__item fd-calendar__special-day fd-calendar__special-day--2

the workaround could be to use a modifier class for fd-calendar__item, like fd-calendar__item--special-day-2

packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
@droshev droshev force-pushed the feat/calendar-horizon-2023 branch 2 times, most recently from c12a479 to 61109b4 Compare May 10, 2023 22:43
@InnaAtanasova InnaAtanasova modified the milestones: Sprint 112, Sprint 113 May 15, 2023
@InnaAtanasova InnaAtanasova changed the title feat(styles): update Calendar component - Horizon 2023 [WIP]feat(styles): update Calendar component - Horizon 2023 May 15, 2023
@InnaAtanasova InnaAtanasova modified the milestones: Sprint 113, Sprint 114 May 29, 2023
@droshev droshev force-pushed the feat/calendar-horizon-2023 branch 6 times, most recently from 0080afb to d5de568 Compare June 2, 2023 16:41
@droshev droshev changed the title [WIP]feat(styles): update Calendar component - Horizon 2023 feat(styles): update Calendar component - Horizon 2023 Jun 4, 2023
@droshev droshev marked this pull request as ready for review June 4, 2023 02:03
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
packages/styles/src/calendar.scss Show resolved Hide resolved
packages/styles/src/calendar.scss Show resolved Hide resolved
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
packages/styles/src/calendar.scss Show resolved Hide resolved
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
packages/styles/src/calendar.scss Outdated Show resolved Hide resolved
@InnaAtanasova
Copy link
Contributor

RTL issues
Screenshot 2023-06-06 at 12 33 58 PM
Screenshot 2023-06-06 at 12 33 50 PM

@InnaAtanasova InnaAtanasova modified the milestones: Sprint 114, Sprint 115 Jun 9, 2023
@droshev droshev changed the title feat(styles): update Calendar component - Horizon 2023 [WIP] feat(styles): update Calendar component - Horizon 2023 Jun 16, 2023
@droshev droshev force-pushed the feat/calendar-horizon-2023 branch 3 times, most recently from 8b17656 to dffdb80 Compare June 19, 2023 15:56
@droshev droshev changed the title [WIP] feat(styles): update Calendar component - Horizon 2023 feat(styles): update Calendar component - Horizon 2023 Jun 19, 2023
@droshev droshev force-pushed the feat/calendar-horizon-2023 branch from dffdb80 to a1bf9fe Compare June 20, 2023 17:44
@droshev droshev force-pushed the feat/calendar-horizon-2023 branch from a1bf9fe to 400a25b Compare June 20, 2023 18:22
@droshev droshev merged commit f83b9c8 into main Jun 20, 2023
@droshev droshev deleted the feat/calendar-horizon-2023 branch June 20, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Horizon 2023 Horizon Design Changes in 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component Design Update: Calendar
2 participants