Skip to content

Commit

Permalink
[tech debt] Address various Emotion component post-conversion TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Sep 10, 2024
1 parent f44f5c7 commit 323aaf9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 30 deletions.
5 changes: 0 additions & 5 deletions packages/eui/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ appendIconComponentCache(iconCache);
import { EuiProvider } from '../src/components/provider';
import { writingModeStyles } from './writing_mode.styles';

// Import light theme for components still using Sass styling
// TODO: Remove this import and the `yarn compile-scss &&` command
// once all EUI components are converted to Emotion
import '../dist/eui_theme_light.css';

/**
* Ensure that any provider errors throw & warn us early
*/
Expand Down
6 changes: 0 additions & 6 deletions packages/eui/generator-eui/changelog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ module.exports = class extends Generator {
type: 'confirm',
default: false,
},
{
message: 'Does your PR contain Emotion conversions?',
name: 'emotionConversions',
type: 'confirm',
default: false,
},
{
message: 'Does your PR contain dependency updates?',
name: 'dependencyUpdates',
Expand Down
5 changes: 0 additions & 5 deletions packages/eui/generator-eui/changelog/templates/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@

- Removed ...

<%_ } -%>
<%_ if (emotionConversions) { -%>
**CSS-in-JS conversions**

- Converted `EuiComponent` to Emotion; Removed `$euiComponentSassVariable`
<%_ } -%>
<%_ if (dependencyUpdates) { -%>
**Dependency updates**
Expand Down
4 changes: 2 additions & 2 deletions packages/eui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"release": "node ./scripts/release.js",
"release-backport": "node ./scripts/release.js --type=backport",
"release-rc": "node ./scripts/release.js --type=prerelease",
"storybook": "yarn compile-scss && storybook dev -p 6006",
"build-storybook": "yarn compile-scss && storybook build",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"pre-push": "yarn test-staged"
},
"repository": {
Expand Down
12 changes: 0 additions & 12 deletions packages/eui/scripts/test-cypress.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const argv = yargs(hideBin(process.argv))
})
.options({
'node-options': { type: 'string', default: '' },
'skip-css': { type: 'boolean' },
dev: { type: 'boolean' },
theme: { type: 'string', default: 'light', choices: ['light', 'dark'] },
a11y: { type: 'boolean' },
Expand All @@ -32,23 +31,12 @@ const argv = yargs(hideBin(process.argv))
const nodeOptions = argv['node-options'];
const isDev = argv.hasOwnProperty('dev');
const isA11y = argv.hasOwnProperty('a11y');
const skipScss = argv.hasOwnProperty('skip-css');
const theme = argv.theme;
const reactVersion = argv['react-version'];

const info = chalk.white;
const log = chalk.grey;

// compile scss -> css so tests can render correctly
if (!skipScss) {
console.log(info('Compiling SCSS'));
execSync(`TARGET_THEME=${theme} yarn compile-scss`, {
stdio: 'inherit',
});
} else {
console.log(info('Not compiling SCSS, disabled by --skip-css'));
}

// compile dev and a11y options for how to run tests (headless, local UI)
// and whether to run component tests or axe checks.
const testParams = isDev
Expand Down

0 comments on commit 323aaf9

Please sign in to comment.