Skip to content
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

[Emotion] Convert final EuiDataGrid cell styles (Part 5) #8013

Merged
merged 28 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
175b2f8
Convert remaining `.euiDataGridRowCell` styles
cee-chen Sep 10, 2024
046bfef
Convert remaining `.euiDataGridRowCell__content` styles
cee-chen Sep 10, 2024
ba408b6
Update downstream snapshots
cee-chen Sep 9, 2024
91a349c
Convert remaining `.euiDataGridHeaderCell` styles
cee-chen Sep 10, 2024
89ad354
[refactor] Remove unnecessary `CellContent` FC
cee-chen Sep 10, 2024
45aeb31
Convert `.euiDataGridHeaderCell__content` styles
cee-chen Sep 10, 2024
95548bb
[refactor] Clean up column actions button/icon DOM+CSS
cee-chen Sep 10, 2024
ccde288
Convert `.euiDataGridHeaderCell__button` styles
cee-chen Sep 10, 2024
c9327ca
Add VRT/E2E tests for header styles
cee-chen Sep 10, 2024
8320712
[refactor] clean up header control column DOM
cee-chen Sep 10, 2024
25d92ff
Update downstream tests/snapshots
cee-chen Sep 10, 2024
480f098
[Enhancement] Replace unused header cell actions CSS
cee-chen Sep 1, 2024
22f27c8
Convert column resizer styles
cee-chen Sep 1, 2024
18ce982
Convert remaining `.euiDataGridFooterCell` styles
cee-chen Sep 9, 2024
2a80790
changelog
cee-chen Sep 10, 2024
64d3ce5
Delete all data grid Sass files
cee-chen Sep 1, 2024
9e68f6f
Final component Sass deletions 🥲
cee-chen Sep 10, 2024
d70c124
[tech debt] Address various Emotion component post-conversion TODOs
cee-chen Sep 10, 2024
5d47175
Final EuiDataGrid VRT updates
cee-chen Sep 10, 2024
d7d70c2
Fix Storybook control docgen for `gridStyle`/`rowHeightsOptions`/`too…
cee-chen Sep 10, 2024
456f5ef
Fix Cypress axe test
cee-chen Sep 10, 2024
64f1748
[PR feedback] Fix column actions button sizing
cee-chen Sep 11, 2024
fb0178c
[PR feedback] Remove `export` on internal consts
cee-chen Sep 11, 2024
3e6c32b
[refactor] avoid render prop + unmemoized array by creating a new fun…
cee-chen Sep 11, 2024
7594ac8
[a11y] Fix VO not correctly reading out SR text due to newlines in JSX
cee-chen Sep 11, 2024
bf7853e
[refactor] remove non-content children out of EuiDataGridCellContent
cee-chen Sep 11, 2024
f53c710
[cleanup] Replace `hidden` attribute with conditional JSX
cee-chen Sep 12, 2024
0b29898
[refactor] clean up focus trap aria-describedby text
cee-chen Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading