Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@stephanieleary
Copy link

Adds the keyboard shortcuts table as shown in the documentation to the calendar modal in a details element, using the original button as the summary toggle.

Includes new strings for every key, keyboard shortcut description, and the "Key, Action" table headers.

@vercel
Copy link

vercel bot commented Aug 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
inclusive-dates ❌ Failed (Inspect) Aug 5, 2024 4:34pm

Copy link
Owner

@fymmot fymmot left a comment

Choose a reason for hiding this comment

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

Thank you so much for taking the time to do this PR!

There are a few issues that need to be fixed (the build is currently failing). See my suggestions in the review.

todayButton: string;
yearSelect: string;
keyboardHint: string;
keyboardKeyTab: string;
Copy link
Owner

Choose a reason for hiding this comment

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

There is a missing type here for keyboardKeyShift

todayButton: "Show today",
yearSelect: "Select year",
keyboardHint: "Keyboard commands",
keyboardKeyTab: "Tab",
Copy link
Owner

Choose a reason for hiding this comment

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

Missing translation here for keyboardKeyShift

</svg>
{this.labels.keyboardHint}
</button>
<details class="{this.getClassName("keyboard-shortcuts")}">
Copy link
Owner

@fymmot fymmot Aug 14, 2024

Choose a reason for hiding this comment

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

A syntax error here, it should be
<details class={this.getClassName("keyboard-shortcuts")}>
(without the quotes)

</button>
<details class="{this.getClassName("keyboard-shortcuts")}">
<summary>
<span class="{this.getClassName("keyboard-hint")}">
Copy link
Owner

Choose a reason for hiding this comment

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

Same here:
<span class={this.getClassName("keyboard-hint")}>

{this.labels.keyboardHint}
</span>
</summary>
<table class="{this.getClassName("keyboard-shortcuts-table")}">
Copy link
Owner

Choose a reason for hiding this comment

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

Same here:
<table class={this.getClassName("keyboard-shortcuts-table")}>

<td>
<kbd>{this.labels.keyboardKeyArrowright}</kbd>
</td>
<td>{this.labels.keyboardShortcutArrowRight}</td>
Copy link
Owner

Choose a reason for hiding this comment

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

This does not match the translation key which uses lower key, causes a Typescript error:
keyboardShortcutArrowright


.inclusive-dates-calendar__keyboard-hint {
color: var(--secondary-color);
display: flex;
Copy link
Owner

Choose a reason for hiding this comment

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

The <summary> icon does not align.
image

But we might do something like this:

    display: inline-flex;
    transform: translateY(2px);

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