From 3ff6b5c4f45e717bf6ec228209cb3aafb854fb13 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Tue, 17 Sep 2024 09:52:53 +0200 Subject: [PATCH 1/3] fix: avoid Table with no data overlay covering other elements --- src/Table/index.tsx | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/Table/index.tsx b/src/Table/index.tsx index 1c5f3344..9b66d5cc 100644 --- a/src/Table/index.tsx +++ b/src/Table/index.tsx @@ -30,27 +30,27 @@ const StyledTable = styled(AntdTable)` font-size: ${fontSizeFromTheme}; } - ${(props) => { + /* Avoid raising the "Keine Daten" overlay above elements such as the menu or dropdown, which have z-index 1050 */ + .mll-ant-table-placeholder { + z-index: 1049 !important; + } + + ${(props) => // @ts-expect-error TODO it seems unsafe to pass empty data to onRow? - if (props.onRow?.({})?.onClick) { - return ` + props.onRow?.({})?.onClick + ? ` tbody tr:hover { cursor: pointer; } - `; - } - - return ''; - }} + ` + : ''} ` as = Record>( props: TableProps, ) => ReactElement; export function Table< RecordType extends Record = Record, ->(props: TableProps) { - const { loading, ...rest } = props; - +>({ loading, ...rest }: TableProps) { return ( props.theme.borderColor}; From 1e22b2f3c19a8d9a7eac08cd1bb450faee174214 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Tue, 17 Sep 2024 09:55:04 +0200 Subject: [PATCH 2/3] explain --- src/Table/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Table/index.tsx b/src/Table/index.tsx index 9b66d5cc..29f71a4a 100644 --- a/src/Table/index.tsx +++ b/src/Table/index.tsx @@ -32,6 +32,7 @@ const StyledTable = styled(AntdTable)` /* Avoid raising the "Keine Daten" overlay above elements such as the menu or dropdown, which have z-index 1050 */ .mll-ant-table-placeholder { + /* !important is necessary because antd sets the z-index to 9999 via the style attribute */ z-index: 1049 !important; } From 835281d03e6cc6e9decb58ce974e1c47849b0335 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Tue, 17 Sep 2024 10:05:52 +0200 Subject: [PATCH 3/3] explain pre-releases --- CONTRIBUTING.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a1c523b..993493b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,23 +1,29 @@ -# Setup +## Setup 1. Clone the repository -1. `yarn` +2. Run `yarn` -# Usage +## Usage -## Validate correctness +### Validate correctness - yarn validate +```sh +yarn validate +``` -## Format code +### Format code - yarn fix +```sh +yarn fix +``` -## Try components interactively +### Try components interactively - yarn storybook +```sh +yarn storybook +``` -# Commit Messages +## Commit Messages We use [semantic-release](https://github.com/semantic-release/semantic-release) to automatically generate - version number @@ -28,3 +34,9 @@ This requires to write commit messages that follow the [Angular commit message f except that we do not use `scope` and `body` is always optional. Merge requests with a lot of intermediary commits must be cleaned up by force pushing rewritten commits. + +## Pre-releases + +When you want to test out your changes in a project before merging, +you can push them to a branch `alpha` or `beta` to trigger a pre-release. +See [publishing pre-releases](https://semantic-release.gitbook.io/semantic-release/recipes/release-workflow/pre-releases).