-
Notifications
You must be signed in to change notification settings - Fork 16
Centralize all CSS imports in index.css for explicit ordering
#2035
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
Changes from all commits
fc6f402
e95c4b7
7e1b28d
802b8fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| /** | ||
| * @type {import("eslint").Linter.Config} | ||
| */ | ||
| module.exports = { | ||
| root: true, | ||
| parser: '@typescript-eslint/parser', | ||
| parserOptions: { | ||
| warnOnUnsupportedTypeScriptVersion: false, | ||
| }, | ||
| extends: [ | ||
| 'eslint:recommended', | ||
| 'plugin:@typescript-eslint/strict', | ||
| 'plugin:@typescript-eslint/stylistic', | ||
| 'plugin:jsx-a11y/recommended', | ||
| 'plugin:react/recommended', | ||
| 'prettier', | ||
| 'plugin:react-hook-form/recommended', | ||
| ], | ||
| plugins: ['@typescript-eslint', 'react-hooks', 'prettier', 'jsx-a11y', 'react-hook-form'], | ||
| settings: { | ||
| react: { | ||
| version: 'detect', | ||
| }, | ||
| }, | ||
| env: { | ||
| node: true, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/array-type': 'off', | ||
| '@typescript-eslint/consistent-type-definitions': 'off', | ||
| '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }], | ||
| '@typescript-eslint/no-empty-function': 'off', | ||
| '@typescript-eslint/no-empty-interface': 'off', | ||
| '@typescript-eslint/ban-ts-comment': 'off', | ||
| '@typescript-eslint/no-non-null-assertion': 'off', | ||
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
| eqeqeq: ['error', 'always', { null: 'ignore' }], | ||
| 'jsx-a11y/label-has-associated-control': [2, { controlComponents: ['button'] }], | ||
| 'no-param-reassign': 'error', | ||
| 'no-restricted-imports': [ | ||
| 'error', | ||
| { | ||
| paths: [ | ||
| '.', // preventing confusion due to auto-imports and barrel files | ||
| ], | ||
| patterns: [ | ||
| // import all CSS except index.css at top level through CSS @import statements | ||
| // to avoid bad ordering situations. See https://github.com/oxidecomputer/console/pull/2035 | ||
| '*.css', | ||
| ], | ||
| }, | ||
| ], | ||
| 'no-return-assign': 'error', | ||
| 'no-unused-vars': 'off', | ||
| 'prefer-arrow-callback': 'off', | ||
| 'prettier/prettier': 'error', | ||
| radix: 'error', | ||
| 'react-hooks/exhaustive-deps': 'error', | ||
| 'react-hooks/rules-of-hooks': 'error', | ||
| 'react/jsx-boolean-value': 'error', | ||
| 'react/display-name': 'off', | ||
| 'react/react-in-jsx-scope': 'off', | ||
| 'react/prop-types': 'off', | ||
| }, | ||
| ignorePatterns: ['dist/'], | ||
| overrides: [ | ||
| { | ||
| files: ['*.js'], | ||
| rules: { | ||
| '@typescript-eslint/no-var-requires': 'off', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['*.e2e.ts'], | ||
| extends: ['plugin:playwright/playwright-test'], | ||
| rules: { | ||
| 'playwright/expect-expect': [ | ||
| 'warn', | ||
| { assertFunctionNames: ['expectVisible', 'expectRowVisible'] }, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ export const NavLinkItem = (props: { | |
| to={props.to} | ||
| className={({ isActive }) => | ||
| cn(linkStyles, { | ||
| '!bg-accent-secondary hover:!bg-accent-secondary-hover svg:!text-accent-tertiary': | ||
| 'text-accent !bg-accent-secondary hover:!bg-accent-secondary-hover svg:!text-accent-tertiary': | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I accidentally deleted this while testing HMR performance after removing barrel files. |
||
| isActive, | ||
| 'pointer-events-none text-disabled': props.disabled, | ||
| }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,21 +2,10 @@ | |
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
| * | ||
| * | ||
| * Copyright Oxide Computer Company | ||
| */ | ||
|
|
||
| .DialogOverlay { | ||
| /* background: hsla(0, 0%, 0%, 0.33); */ | ||
| @apply fixed inset-0 z-10 overflow-auto bg-scrim; | ||
| } | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Turned this into a |
||
|
|
||
| .DialogContent { | ||
| @apply z-20; | ||
|
|
||
| width: 50vw; | ||
| margin: 10vh auto; | ||
| background: white; | ||
| padding: 2rem; | ||
| outline: none; | ||
| } | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had copied this stuff in from Reach dialog when we switched to Radix, even though almost all of it was being overridden. |
||
| export const DialogOverlay = () => ( | ||
| <div aria-hidden className="fixed inset-0 z-10 overflow-auto bg-scrim" /> | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ import { Close12Icon } from '@oxide/design-system/icons/react' | |
| import { classed } from '~/util/classed' | ||
|
|
||
| import { Button } from './Button' | ||
| import { DialogOverlay } from './DialogOverlay' | ||
|
|
||
| const ModalContext = createContext(false) | ||
|
|
||
|
|
@@ -56,13 +57,9 @@ export function Modal({ children, onDismiss, title, isOpen }: ModalProps) { | |
| modal={false} | ||
| > | ||
| <Dialog.Portal> | ||
| <div | ||
| className="DialogOverlay pointer-events-auto" | ||
| onClick={onDismiss} | ||
| aria-hidden | ||
| /> | ||
| <DialogOverlay /> | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't find any problem with removing this |
||
| <AnimatedDialogContent | ||
| className="DialogContent ox-modal pointer-events-auto fixed left-1/2 top-1/2 z-modal m-0 flex max-h-[min(800px,80vh)] w-auto min-w-[28rem] max-w-[32rem] flex-col justify-between rounded-lg border p-0 bg-raise border-secondary elevation-2" | ||
| className="pointer-events-auto fixed left-1/2 top-1/2 z-modal m-0 flex max-h-[min(800px,80vh)] w-auto min-w-[28rem] max-w-[32rem] flex-col justify-between rounded-lg border p-0 bg-raise border-secondary elevation-2" | ||
| aria-labelledby={titleId} | ||
| style={{ | ||
| transform: y.to((value) => `translate3d(-50%, ${-50 + value}%, 0px)`), | ||
|
|
||
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.
converted this file to JS solely so I could put this comment here