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

Fix styling inconsistency #112

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
81 changes: 40 additions & 41 deletions app/components/IduMap/styles.css
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
.filters-container {
.displacement-legend {
display: flex;
flex-basis: 20%;
flex-direction: column;
gap: var(--tui-spacing-extra-small);
.container {
flex-basis: 100%;
.filters-container {

.legend-element-list {
.displacement-legend {
display: flex;
flex-grow: 1;
gap: var(--tui-spacing-small);
height: 3rem;
}
}
.number-legend {
display: flex;
flex-basis: 40%;
flex-direction: column;
gap: var(--tui-spacing-extra-small);
flex-basis: 20%;
flex-direction: column;
gap: var(--tui-spacing-extra-small);

.legend-element-list {
display: flex;
flex-grow: 1;
gap: var(--tui-spacing-small);
height: 3rem;
.legend-element-list {
display: flex;
flex-grow: 1;
gap: var(--tui-spacing-small);
height: 3rem;
}
}
@media (max-width: 1000px) {
.number-legend {
display: flex;
flex-basis: 40%;
flex-direction: column;
gap: var(--tui-spacing-extra-small);

.legend-element-list {
gap: var(--tui-spacing-extra-extra-small);
display: flex;
flex-grow: 1;
gap: var(--tui-spacing-small);
height: 3rem;
}
@media (max-width: 1000px) {
.legend-element-list {
gap: var(--tui-spacing-extra-extra-small);
}
}
}
}

.time-range-container {
display: flex;
flex-direction: column;
flex-grow: 1;
gap: var(--tui-spacing-medium);
.time-range-container {
display: flex;
flex-direction: column;
flex-grow: 1;
gap: var(--tui-spacing-medium);

.time-range-input {
width: 100%;
.time-range-input {
width: 100%;
}
}
}
@media (max-width: 1000px) {
.time-range-container {
padding-right: var(--tui-spacing-medium);
@media (max-width: 1000px) {
.time-range-container {
padding-right: var(--tui-spacing-medium);
}
}
}
}

.disaster-button {
background-color: var(--color-background-dark);
height: 2.5rem;
}
4 changes: 2 additions & 2 deletions app/components/IduMap/useIduMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function useIduQuery(

const idus = React.useMemo(() => (
iso3
? iduData?.idu.filter((item) => item.iso3 === iso3)
? iduData?.idu?.filter((item) => item.iso3 === iso3)
: iduData?.idu
), [iso3, iduData]);

Expand Down Expand Up @@ -204,6 +204,7 @@ function useIduQuery(

const widget = (
<Container
className={styles.container}
filtersClassName={styles.filtersContainer}
filters={(
<>
Expand Down Expand Up @@ -282,7 +283,6 @@ function useIduQuery(
variant="primary"
compact
href={giddLink}
className={styles.disasterButton}
target="_parent"
icons={(
<IoExitOutline />
Expand Down
2 changes: 1 addition & 1 deletion app/views/DisasterWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function DisasterWidget(props: Props) {
</ButtonLikeLink>
<PopupButton
className={styles.exportButton}
label="Download data"
label="Download dataset"
name="download"
variant="primary"
persistent={false}
Expand Down
1 change: 1 addition & 0 deletions app/views/Gidd/DataTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ function DataTable(props: Props) {
keySelector={displacementItemKeySelector}
data={displacementsResponse?.giddPublicDisplacements?.results}
columns={columns}
resizableColumn
/>
</SortContext.Provider>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/GoodPractices/AddGoodPractice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ function AddGoodPractice(props: Props) {
onSubmit={handleSubmit}
>
<Modal
className={styles.modal}
onClose={onModalClose}
headingClassName={styles.headingContainer}
heading={(
Expand All @@ -320,12 +321,11 @@ function AddGoodPractice(props: Props) {
</div>
)}
footerClassName={styles.footer}
className={styles.modal}
footer={(
<Button
name={undefined}
type="submit"
variant="accent"
variant="primary"
onClick={handleSubmit}
disabled={pristine || createNewGoodPracticeLoading || !agreeTerms}
compact
Expand Down
2 changes: 1 addition & 1 deletion app/views/GoodPractices/AddGoodPractice/styles.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.modal {
display: flex;
flex-direction: column;
height: 86vh!important;
height: 76vh!important;

.heading-container {
font-weight: unset;
Expand Down
3 changes: 2 additions & 1 deletion app/views/GoodPractices/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ function GoodPractices(props: Props) {
/>
<HTMLOutput value={goodPracticeDescription} />
<Button
className={styles.findGoodPracticeButton}
onClick={handleJumpToGoodPractices}
name={undefined}
>
Expand Down Expand Up @@ -948,7 +949,7 @@ function GoodPractices(props: Props) {
<Button
name={undefined}
onClick={showNewGoodPracticeModal}
className={styles.newGoodPractice}
variant="primary"
>
{strings.submitNewGoodPracticeLabel}
</Button>
Expand Down
8 changes: 4 additions & 4 deletions app/views/GoodPractices/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
width: 100%;
max-width: var(--width-page-max);
gap: var(--tui-spacing-large);

.find-good-practice-button {
align-self: flex-start;
}
}

.language-selection {
Expand Down Expand Up @@ -100,10 +104,6 @@
background-color: var(--tui-color-background);
padding: var(--tui-spacing-medium);
gap: var(--tui-spacing-medium);

.new-good-practice {
display: flex;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/IduWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function IduWidget(props: IduWidgetProps) {
</Button>
)}
</div>
<div>
<div className={styles.mapDescription}>
Hover over and click on the coloured bubbles to see near real-time
snapshots of situations of internal displacement.
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/views/IduWidget/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
flex-wrap: wrap;
gap: var(--tui-spacing-large);
}

.map-description {
flex-basis: 100%;
}
}
}
}
Loading