-
Notifications
You must be signed in to change notification settings - Fork 0
feat(workspace): loop tonight's first section on the map #903
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
Open
seonghobae
wants to merge
17
commits into
develop
Choose a base branch
from
feat/workspace-loop-first-section
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c8268a9
feat(workspace): loop tonight's first section on the map
seonghobae 3f193bf
fix(workspace): document section loop handler
seonghobae c652b88
test(workspace): require natural Korean loop action copy
seonghobae e89b26e
fix(workspace): use particle-safe Korean loop copy
seonghobae 1497cd6
test(workspace): require localized timeline region label
seonghobae 75b4ebe
fix(workspace): localize timeline region accessibility label
seonghobae da9cace
fix(i18n): add timeline region accessibility copy
seonghobae ff9be41
fix(i18n): localize Korean timeline region label
seonghobae 29d708a
test(workspace): require reduced-motion-safe loop focus
seonghobae c03d84d
fix(workspace): honor reduced-motion loop navigation
seonghobae 90f7a99
test(workspace): require renderer-owned section card ids
seonghobae a34594e
fix(workspace): keep section focus ids renderer-owned
seonghobae fa84e15
fix(workspace): bind loop focus to renderer positions
seonghobae 7d14333
test(workspace): verify renderer-owned loop focus positions
seonghobae 1f3e8c7
test(workspace): build duplicate-section focus fixture explicitly
seonghobae 734c3a4
Merge branch 'develop' into feat/workspace-loop-first-section
seonghobae 69efb48
Merge remote-tracking branch 'origin/develop' into HEAD
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
apps/desktop/src/features/workspace/Workspace.reduced-motion.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import { fireEvent, render, screen } from "@testing-library/react"; | ||
| import { createDemoRehearsalSong } from "@bandscope/shared-types"; | ||
| import { afterEach, describe, expect, it, vi } from "vitest"; | ||
| import { Workspace } from "./Workspace"; | ||
|
|
||
| const originalLanguage = navigator.language; | ||
| const originalMatchMedia = window.matchMedia; | ||
| const originalScrollIntoView = HTMLElement.prototype.scrollIntoView; | ||
|
|
||
| function setNavigatorLanguage(language: string): void { | ||
| Object.defineProperty(navigator, "language", { | ||
| configurable: true, | ||
| value: language | ||
| }); | ||
| } | ||
|
|
||
| describe("Workspace reduced-motion loop navigation", () => { | ||
| afterEach(() => { | ||
| setNavigatorLanguage(originalLanguage); | ||
| Object.defineProperty(window, "matchMedia", { | ||
| configurable: true, | ||
| value: originalMatchMedia | ||
| }); | ||
| Object.defineProperty(HTMLElement.prototype, "scrollIntoView", { | ||
| configurable: true, | ||
| value: originalScrollIntoView | ||
| }); | ||
| vi.restoreAllMocks(); | ||
| }); | ||
|
|
||
| it("uses non-animated roadmap scrolling when reduced motion is requested", () => { | ||
| setNavigatorLanguage("en-US"); | ||
| const scrollIntoView = vi.fn(); | ||
| Object.defineProperty(HTMLElement.prototype, "scrollIntoView", { | ||
| configurable: true, | ||
| value: scrollIntoView | ||
| }); | ||
| Object.defineProperty(window, "matchMedia", { | ||
| configurable: true, | ||
| value: vi.fn((query: string) => ({ | ||
| matches: query === "(prefers-reduced-motion: reduce)", | ||
| media: query, | ||
| onchange: null, | ||
| addListener: vi.fn(), | ||
| removeListener: vi.fn(), | ||
| addEventListener: vi.fn(), | ||
| removeEventListener: vi.fn(), | ||
| dispatchEvent: vi.fn() | ||
| })) | ||
| }); | ||
|
|
||
| render(<Workspace song={createDemoRehearsalSong()} />); | ||
| fireEvent.click(screen.getByRole("button", { name: "Loop verse from 0:10 to 0:30" })); | ||
|
|
||
| expect(scrollIntoView).toHaveBeenCalledWith({ | ||
| behavior: "auto", | ||
| block: "nearest", | ||
| inline: "center" | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
apps/desktop/src/features/workspace/Workspace.timeline-region-i18n.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { render, screen } from "@testing-library/react"; | ||
| import { createDemoRehearsalSong } from "@bandscope/shared-types"; | ||
| import { afterEach, describe, expect, it } from "vitest"; | ||
| import { Workspace } from "./Workspace"; | ||
|
|
||
| const originalLanguageDescriptor = Object.getOwnPropertyDescriptor(window.navigator, "language"); | ||
|
|
||
| afterEach(() => { | ||
| if (originalLanguageDescriptor) { | ||
| Object.defineProperty(window.navigator, "language", originalLanguageDescriptor); | ||
| } else { | ||
| Reflect.deleteProperty(window.navigator, "language"); | ||
| } | ||
| }); | ||
|
|
||
| function useKoreanLocale(): void { | ||
| Object.defineProperty(window.navigator, "language", { | ||
| configurable: true, | ||
| value: "ko-KR" | ||
| }); | ||
| } | ||
|
|
||
| describe("Workspace timeline region localization", () => { | ||
| it("uses localized accessible copy for the scrollable song-structure timeline", () => { | ||
| useKoreanLocale(); | ||
|
|
||
| render(<Workspace song={createDemoRehearsalSong()} />); | ||
|
|
||
| expect(screen.getByRole("region", { name: "스크롤 가능한 곡 구조 타임라인" })).toBeTruthy(); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Info: Index-based card ids resolve the duplicate-id focus fix
Card ids and focus routing now key on renderer position rather than analysis
section.id. BothSongStructurechips andSectionRoadmapcards iteratesong.sectionsin the same order, so duplicate or whitespace-bearing analysis ids no longer misroute focus or collide.Was this helpful? React with 👍 or 👎 to provide feedback.