Skip to content

Commit

Permalink
fix: small leftover bugs (#3555)
Browse files Browse the repository at this point in the history
* fix: small fixes

* fix: ProgressIndicator colors

* fix: sidebar z-index

* fix: acc tests

* fix: more acc
  • Loading branch information
OliwiaGowor authored Dec 24, 2024
1 parent cedc25c commit 413b65f
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

.banner-carousel {
height: fit-content;
width: calc(100% - 1px);
}

.feature-card {
Expand Down
1 change: 1 addition & 0 deletions src/components/Preferences/Preferences.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
width: 100%;
height: 75vh;
padding: 0;
list-style-type: none;

.vertical-tabs-wrapper {
height: 100% !important;
Expand Down
1 change: 0 additions & 1 deletion src/resources/createResourceRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ const ColumnWrapper = ({
const elementCreateProps = usePrepareCreateProps({
resourceCustomType: props.resourceCustomType,
resourceType: props.resourceType,
resourceTypeForTitle: props.resourceType,
apiGroup: props.apiGroup,
apiVersion: props.apiVersion,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export const ExpandableListItem = ({
const { t } = useTranslation();
const [expanded, setExpanded] = useState(false);

let statusType = status === 'True' ? 'Success' : 'Error';
let statusType = status === 'True' ? 'Positive' : 'Negative';
if (overrideStatusType !== undefined) {
statusType = overrideStatusType === 'True' ? 'Success' : 'Error';
statusType = overrideStatusType === 'True' ? 'Positive' : 'Negative';
}

return (
Expand Down
4 changes: 2 additions & 2 deletions src/shared/components/GenericList/SortModalPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const SortModalPanel = ({
}}
accessibleName="sortOrderList"
>
<ListItemGroup>{t('common.sorting.sort-order')}</ListItemGroup>
<ListItemGroup headerText={t('common.sorting.sort-order')} />
<ListItemCustom selected={order === 'ASC'}>
<RadioButton
name="sortOrder"
Expand All @@ -99,7 +99,7 @@ export const SortModalPanel = ({
}}
accessibleName="sortByList"
>
<ListItemGroup>{t('common.sorting.sort-by')}</ListItemGroup>
<ListItemGroup headerText={t('common.sorting.sort-by')} />
{sortBy && (
<>
{Object.entries(sortBy).flatMap(([value]) => {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/components/PodTemplate/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function ContainerComponent({ container }) {

return (
<>
<ListItemGroup>{container.name}</ListItemGroup>
<ListItemGroup headerText={container.name} />
<PodTemplateRow
label={t('pods.labels.image')}
component={
Expand Down Expand Up @@ -173,7 +173,7 @@ function VolumeComponent({ volume }) {

return (
<>
<ListItemGroup>{name}</ListItemGroup>
<ListItemGroup headerText={name} />
<PodTemplateRow label="Type" component={<Text>{typeLabel}</Text>} />
{k8sResource && (
<PodTemplateRow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ProgressIndicator } from '@ui5/webcomponents-react';
import PropTypes from 'prop-types';
import React, { useRef } from 'react';
import { Tooltip } from 'shared/components/Tooltip/Tooltip';
import './ProgressIndicatorWithPercentage.scss';

Expand All @@ -19,18 +18,19 @@ export const ProgressIndicatorWithPercentage = ({
leftTitle,
rightTitle,
}) => {
const progressRef = useRef(null);
const dataBar = progressRef.current?.shadowRoot?.querySelector(
'.ui5-progress-indicator-bar',
);
const remainingBar = progressRef.current?.shadowRoot?.querySelector(
'.ui5-progress-indicator-remaining-bar',
);
const applyColors = progressRef => {
const dataBar = progressRef?.shadowRoot?.querySelector(
'.ui5-progress-indicator-bar',
);
const remainingBar = progressRef?.shadowRoot?.querySelector(
'.ui5-progress-indicator-remaining-bar',
);

if (dataBar && remainingBar) {
dataBar.style['background-color'] = dataBarColor;
remainingBar.style['background-color'] = remainingBarColor;
}
if (dataBar && remainingBar) {
dataBar.style['background-color'] = dataBarColor;
remainingBar.style['background-color'] = remainingBarColor;
}
};

return (
<TooltipWrapper tooltipProps={tooltip}>
Expand All @@ -43,7 +43,7 @@ export const ProgressIndicatorWithPercentage = ({
<ProgressIndicator
displayValue={leftTitle}
value={value}
ref={progressRef}
ref={progress => applyColors(progress)}
className="progress-indicator"
style={{ position: 'relative', zIndex: '0' }}
/>
Expand Down
1 change: 1 addition & 0 deletions src/sidebar/Sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

ui5-side-navigation {
border-radius: 0.5rem;
z-index: 999;
}
.space-top {
height: 0.75rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ context('Accessibility test Cron Jobs', () => {
.clear()
.type('busybox', { force: true });

cy.get('ui5-combobox[value="IfNotPresent"]')
.find('ui5-icon[accessible-name="Select Options"]')
.click();
cy.get('ui5-combobox[value="IfNotPresent"]').click();

cy.get('ui5-li:visible')
.contains('Always')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ context('Accessibility test Extensions view', () => {

it('Clean up', () => {
cy.getLeftNav()
.find('ui5-side-navigation-item')
.contains('Namespaces')
.click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ context('Accessibility test Pizza Orders', () => {
cy.loginAndSelectCluster();

cy.getLeftNav()
.find('ui5-side-navigation-item')
.contains('Namespaces')
.click();

Expand Down

0 comments on commit 413b65f

Please sign in to comment.