Skip to content

Commit

Permalink
Merge branch 'fix-aside-header-tabbable' of https://github.com/gravit…
Browse files Browse the repository at this point in the history
…y-ui/navigation into fix-aside-header-tabbable
  • Loading branch information
kmenshov committed Sep 16, 2024
2 parents 81f25bb + a6262e3 commit 07901f4
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 18 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.23.1](https://github.com/gravity-ui/navigation/compare/v2.23.0...v2.23.1) (2024-09-10)


### Bug Fixes

* **Logo:** fix condition display logo ([#306](https://github.com/gravity-ui/navigation/issues/306)) ([38f234a](https://github.com/gravity-ui/navigation/commit/38f234a98f2d526e04f1d85ad6907e015cd81315))

## [2.23.0](https://github.com/gravity-ui/navigation/compare/v2.22.0...v2.23.0) (2024-08-30)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gravity-ui/navigation",
"version": "2.23.0",
"version": "2.23.1",
"description": "Gravity UI Navigation components",
"license": "MIT",
"repository": {
Expand Down
16 changes: 15 additions & 1 deletion scripts/playwright-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,34 @@ IMAGE_TAG="v1.45.3-jammy" # This version have to be synchronized with playwright

NODE_MODULES_CACHE_DIR="$HOME/.cache/navigation-playwright-docker-node-modules"

command_exists() {
command -v "$1" >/dev/null 2>&1
}

run_command() {
docker run --rm --network host -it -w /work \
$CONTAINER_TOOL run --rm --network host -it -w /work \
-v $(pwd):/work \
-v "$NODE_MODULES_CACHE_DIR:/work/node_modules" \
"$IMAGE_NAME:$IMAGE_TAG" \
/bin/bash -c "$1"
}

if command_exists docker; then
CONTAINER_TOOL="docker"
elif command_exists podman; then
CONTAINER_TOOL="podman"
else
echo "Neither Docker nor Podman is installed on the system."
exit 1
fi

if [[ "$1" = "clear-cache" ]]; then
rm -rf "$NODE_MODULES_CACHE_DIR"
exit 0
fi

if [[ ! -d "$NODE_MODULES_CACHE_DIR" ]]; then
mkdir -p "$NODE_MODULES_CACHE_DIR"
run_command 'npm ci'
fi

Expand Down
4 changes: 1 addition & 3 deletions src/components/AsideHeader/components/FirstPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const FirstPanel = React.forwardRef<HTMLDivElement>((_props, ref) => {
customBackgroundClassName,
className,
hideCollapseButton,
logo,
qa,
} = useAsideHeaderInnerContext();
const visibleMenuItems = useVisibleMenuItems();
Expand All @@ -47,8 +46,7 @@ export const FirstPanel = React.forwardRef<HTMLDivElement>((_props, ref) => {
{customBackground}
</div>
)}
{/* TODO add new prop for hiding Header */}
{logo && <Header />}
<Header />
{visibleMenuItems?.length ? (
<CompositeBar
type="menu"
Expand Down
20 changes: 9 additions & 11 deletions src/components/AsideHeader/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ export const Header = () => {
[onClosePanel, logo],
);

if (!logo) {
return null;
}

return (
<div className={b('header', {['with-decoration']: headerDecoration})}>
<Logo
{...logo}
onClick={onLogoClick}
compact={compact}
buttonClassName={b('logo-button')}
iconPlaceClassName={b('logo-icon-place')}
/>
{logo && (
<Logo
{...logo}
onClick={onLogoClick}
compact={compact}
buttonClassName={b('logo-button')}
iconPlaceClassName={b('logo-icon-place')}
/>
)}

<CompositeBar
type="subheader"
Expand Down

0 comments on commit 07901f4

Please sign in to comment.