Skip to content

Commit

Permalink
[Emotion] Convert final EuiDataGrid cell styles (Part 5) (#8013)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Sep 12, 2024
1 parent b736b90 commit a1a876e
Show file tree
Hide file tree
Showing 99 changed files with 975 additions and 1,084 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/eui/.storybook/loki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const LOKI_SELECTORS = {
/**
* Portal element content selector
*/
portal: '#storybook-root',
portal: '#storybook-root > *',
} as const;

/**
Expand Down
5 changes: 0 additions & 5 deletions packages/eui/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,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
7 changes: 7 additions & 0 deletions packages/eui/changelogs/upcoming/8013.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**CSS-in-JS conversions**

- Converted `EuiDataGrid`'s row, header, and footer cells to Emotion; Removed the following Sass variables and mixins:
- `$euiDataGridColumnResizerWidth`
- `@euiDataGridRowCell`
- `@euiDataGridHeaderCell`
- `@euiDataGridFooterCell`
2 changes: 0 additions & 2 deletions packages/eui/cypress/support/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ Cypress.on('uncaught:exception', (err) => {
return false;
}
});

require(THEME_IMPORT); // defined by DefinePlugin in the cypress webpack config
3 changes: 0 additions & 3 deletions packages/eui/cypress/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

const { ProvidePlugin, DefinePlugin } = require('webpack');

const THEME_IMPORT = `'../../dist/eui_theme_${process.env.THEME}.css'`;

const alias = {};
const reactVersion = process.env.REACT_VERSION || '18';

Expand Down Expand Up @@ -72,7 +70,6 @@ module.exports = {
}),

new DefinePlugin({
THEME_IMPORT, // allow cypress/support/component.tsx to require the correct css file
'process.env.REACT_VERSION': JSON.stringify(reactVersion),
}),
],
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
Loading

0 comments on commit a1a876e

Please sign in to comment.