This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
refactor: Enhanced Dark Mode as third-party dependency #366
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1e7c5e0
refactor: Swap to @smotaal.io/dark-mode-controller NPM
993dbce
build: Upgrade to @smotaal.io/dark-mode-controller@0.0.3
SMotaal 567ebbc
fix: Delegating to dark-mode-controller not always stable
SMotaal 247d9cb
test: Update snapshots
SMotaal 3a59084
fix: Restore accidentally deleted `.nvmrc`
SMotaal 5b05bb6
build: Upgrade to @smotaal.io/dark-mode-controller@0.0.4
SMotaal a2780e5
Merge branch 'staging' into refactor-enhanced-dark-mode
SMotaal 4b5a28a
Merge branch 'staging' of https://github.com/nodejs/nodejs.dev into r…
SMotaal e7b8768
refactor: Delete controls.tsx
SMotaal 23401e0
refactor: Optionally cascade darkModeController as a property
SMotaal 30f8322
test(snapshot): Updated snapshot for banner.tsx
SMotaal 15ad5a3
build: Set explicit version for @smotaal.io/dark-mode-controller
SMotaal 955978c
build: Update yarn.lock
SMotaal 2aabe27
Merge branch 'staging' into refactor-enhanced-dark-mode
SMotaal 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v8.12.0 | ||
| v8.12.0 | ||
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
| import React from 'react'; | ||
| import { DarkModeController } from '@smotaal.io/dark-mode-controller/commonjs'; | ||
|
|
||
| export interface ReactDarkModeController extends DarkModeController { | ||
| onPointerDown( | ||
| event: React.PointerEvent | React.MouseEvent | PointerEvent | ||
| ): void; | ||
| onPointerUp( | ||
| event: React.PointerEvent | React.MouseEvent | PointerEvent | ||
| ): void; | ||
| handleEvent(event?: React.PointerEvent | React.MouseEvent | Event): void; | ||
| } | ||
|
|
||
| // TODO: Figure out a way around HRM glitching (tackled upstream) | ||
| // SEE: https://github.com/SMotaal/meta/issues/7 | ||
|
|
||
| // We're exporting a singleton | ||
| export default new DarkModeController() as ReactDarkModeController; |
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
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.
Uh oh!
There was an error while loading. Please reload this page.