Skip to content

fix: datalayer theme#202

Merged
echarles merged 3 commits intomainfrom
core/theme
Jan 28, 2026
Merged

fix: datalayer theme#202
echarles merged 3 commits intomainfrom
core/theme

Conversation

@echarles
Copy link
Copy Markdown
Member

@echarles echarles commented Jan 23, 2026

Includes also minor fix for useCache.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 23, 2026

Deploy Preview for datalayer-core ready!

Name Link
🔨 Latest commit c552b8f
🔍 Latest deploy log https://app.netlify.com/projects/datalayer-core/deploys/6979b0b4c6ac850008ac5f91
😎 Deploy Preview https://deploy-preview-202--datalayer-core.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 project configuration.

@echarles echarles marked this pull request as ready for review January 28, 2026 06:46
Copilot AI review requested due to automatic review settings January 28, 2026 06:46
Copy link
Copy Markdown
Member Author

@echarles echarles left a comment

Choose a reason for hiding this comment

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

LGTM

@echarles echarles merged commit 0838732 into main Jan 28, 2026
16 of 18 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Datalayer theming implementation to use a dedicated Datalayer Primer theme/palette and adjusts navigation + caching behaviors to better align with expected UX/data freshness.

Changes:

  • Introduces a Datalayer accessible color system and expands Primer theme overrides for light/dark schemes.
  • Updates DatalayerThemeProvider to apply the Datalayer theme and set base/button styling defaults.
  • Enhances navigation (scroll-to-top + numeric history navigation) and adjusts cache behavior for secrets + query options.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/theme/DatalayerThemeProvider.tsx Applies the Datalayer theme in ThemeProvider and sets light/dark base styles + primary button CSS variables.
src/theme/DatalayerTheme.ts Adds datalayerColors, defines light/dark theme overrides, and exports the merged Primer+Datalayer theme.
src/hooks/useNavigate.tsx Adds scroll-to-top on React Router navigations and supports numeric history navigation in the native navigator.
src/hooks/useCache.ts Stops pre-populating secret detail cache from list results, extends useSecret query options, and changes OAuth2 link mutation return value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +18
const baseStyleDark: CSSProperties = {
backgroundColor: datalayerColors.black,
color: datalayerColors.white,
fontSize: 'var(--text-body-size-medium)',
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

BaseStyles is being forced to hard-coded hex backgroundColor/color values. This bypasses Primer theme CSS variables, so if colorMode is auto (or if dayScheme/nightScheme are customized) the computed scheme can diverge from these inline colors. Consider going back to using the Primer tokens (e.g., var(--bgColor-default) / var(--fgColor-default)) or deriving the resolved scheme from Primer and only overriding when you can reliably detect dark vs light.

Copilot uses AI. Check for mistakes.
Comment thread src/hooks/useCache.ts
url: `${configuration.iamRunUrl}/api/iam/v1/oauth2/authz/url/link?${queryString}`,
});
return resp.autorization_url;
return resp;
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

useOAuth2AuthorizationLinkURL is documented/typed as returning an OAuth2 authorization URL (autorization_url: string), but the mutation currently returns the entire resp object. This makes the hook’s return type inconsistent with useOAuth2AuthorizationURL and will break callers expecting a string URL. Return resp.autorization_url (or update the response type and docstring if the endpoint intentionally returns a different shape).

Suggested change
return resp;
return resp.autorization_url;

Copilot uses AI. Check for mistakes.
@echarles echarles deleted the core/theme branch April 16, 2026 03:57
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