Skip to content

Commit

Permalink
fix(css): restyle cards
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuan Vo committed Apr 5, 2023
1 parent c655433 commit a747a89
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
17 changes: 11 additions & 6 deletions src/app/Dashboard/AddCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ import {
Select,
SelectOption,
SelectOptionObject,
Stack,
StackItem,
Switch,
Text,
TextArea,
Expand Down Expand Up @@ -174,7 +176,7 @@ export const AddCard: React.FC<AddCardProps> = (_) => {

return (
<>
<Card isRounded isCompact isFullHeight>
<Card isRounded isCompact>
<CardBody>
<Bullseye>
<EmptyState variant={EmptyStateVariant.large}>
Expand All @@ -193,11 +195,12 @@ export const AddCard: React.FC<AddCardProps> = (_) => {
<Modal
aria-label="Dashboard Card Catalog Modal"
isOpen={showWizard}
variant={ModalVariant.large}
width={'80%'}
hasNoBodyWrapper
showClose={false}
>
<Wizard
id={'card-catalog-wizard'}
onClose={handleStop}
onSave={handleAdd}
nav={customNav}
Expand All @@ -224,12 +227,14 @@ export const AddCard: React.FC<AddCardProps> = (_) => {
: 'Next',
}}
>
<Form>
<FormGroup label="Select a card type" isRequired data-quickstart-id="card-type-selector">
<Stack>
<StackItem>
<Text>{t('Dashboard.ADD_CARD_HELPER_TEXT')}</Text>
</StackItem>
<StackItem isFilled>
<CardGallery selection={selection} onSelect={handleSelect} />
</FormGroup>
</Form>
</StackItem>
</Stack>
</WizardStep>
<WizardStep
id="card-props-config"
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export const Dashboard: React.FC<DashboardProps> = (_) => {
<TargetView pageTitle={t('Dashboard.PAGE_TITLE')} attachments={<DashboardLayoutConfig />}>
<ChartContext.Provider value={chartContext}>
<Grid id={'dashboard-grid'} hasGutter>
<GridItem key={-1} span={4} rowSpan={1} order={{ default: '-99999' }}>
<GridItem key={-1} span={4} order={{ default: '-99999' }}>
<AddCard />
</GridItem>
{currLayout.cards
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/JvmDetails/JvmDetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const JvmDetailsCard: React.FC<JvmDetailsCardProps> = (props) => {
>
<CardBody
// FIXME: Remove after implementing height resizing
style={{ height: '30em' }}
style={{ height: '36em' }}
>
<EntityDetails entity={wrappedTarget} actionFilter={actionFilter} />
</CardBody>
Expand Down
1 change: 0 additions & 1 deletion src/app/Topology/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ Below CSS rules only apply to Topology components

.entity-overview .pf-c-tab-content {
flex: 1 1 0;
min-height: 0;
overflow: auto;
}

Expand Down
4 changes: 4 additions & 0 deletions src/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -545,3 +545,7 @@ svg.topology__node-decorator-icon.success {
svg.topology__node-decorator-icon.progress {
fill: var(--pf-global--info-color--100);
}

#card-catalog-wizard .pf-c-wizard__main-body {
height: 100%
}
2 changes: 1 addition & 1 deletion src/test/Dashboard/__snapshots__/Dashboard.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Array [
id="dashboard-grid"
>
<div
className="pf-l-grid__item pf-m-4-col pf-m-1-row"
className="pf-l-grid__item pf-m-4-col"
style={
Object {
"--pf-l-grid--item--Order": "-99999",
Expand Down

0 comments on commit a747a89

Please sign in to comment.