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

0.43.0 #1492

Merged
merged 4 commits into from
Sep 14, 2023
Merged

0.43.0 #1492

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
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.43.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.42.0...v0.43.0)

- fix(herobody): solves empty highlight deafult issue [`#1489`](https://github.com/isomerpages/isomercms-frontend/pull/1489)
- fix(edithomepage): spread properly [`#1487`](https://github.com/isomerpages/isomercms-frontend/pull/1487)
- Release/0.42.0 (develop) [`#1481`](https://github.com/isomerpages/isomercms-frontend/pull/1481)

#### [v0.42.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.41.0...v0.42.0)

> 7 September 2023

- fix(editable): hover and focus states for title text [`#1484`](https://github.com/isomerpages/isomercms-frontend/pull/1484)
- Fix/style nits [`#1483`](https://github.com/isomerpages/isomercms-frontend/pull/1483)
- fix: styling [`#1482`](https://github.com/isomerpages/isomercms-frontend/pull/1482)
Expand Down Expand Up @@ -64,12 +72,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: downgrade webpack-dev-server [`#1418`](https://github.com/isomerpages/isomercms-frontend/pull/1418)
- fix(e2e): reduce mem usage [`#1428`](https://github.com/isomerpages/isomercms-frontend/pull/1428)
- Release/0.39.0 [`#1425`](https://github.com/isomerpages/isomercms-frontend/pull/1425)
- fix: conditional for checkCSP [`#1423`](https://github.com/isomerpages/isomercms-frontend/pull/1423)

#### [v0.39.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.38.0...v0.39.0)

> 16 August 2023
> 17 August 2023

- fix: conditional for checkCSP [`#1423`](https://github.com/isomerpages/isomercms-frontend/pull/1423)
- feat(sl): integrate screens with be [`#1410`](https://github.com/isomerpages/isomercms-frontend/pull/1410)
- Fix/is 422 update csp retrieval [`#1414`](https://github.com/isomerpages/isomercms-frontend/pull/1414)
- Feat(site launch): add pending screen [`#1409`](https://github.com/isomerpages/isomercms-frontend/pull/1409)
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": "isomercms-frontend",
"version": "0.42.0",
"version": "0.43.0",
"private": true,
"engines": {
"node": ">=16.0.0"
Expand Down
8 changes: 7 additions & 1 deletion src/layouts/EditHomepage/EditHomepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -960,12 +960,17 @@ const EditHomepage = ({ match }) => {
handleHighlightDropdownToggle={
handleHighlightDropdownToggle
}
initialSectionType={
section.hero.dropdown
? "dropdown"
: "highlights"
}
>
{({ currentSelectedOption }) =>
currentSelectedOption === "dropdown" ? (
<HeroDropdownSection
{...section.hero}
{...section.hero.dropdown}
state={section.hero}
errors={{
...errors,
...errors.sections[0].hero,
Expand All @@ -978,6 +983,7 @@ const EditHomepage = ({ match }) => {
...errors.sections[0].hero,
}}
highlights={section.hero.key_highlights}
{...section.hero}
/>
)
}
Expand Down
6 changes: 4 additions & 2 deletions src/layouts/components/Homepage/HeroBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ interface HeroBodyProps extends HeroBodyFormFields {
children: (props: {
currentSelectedOption: HeroSectionType
}) => React.ReactNode
initialSectionType: HeroSectionType
}

export const HeroBody = ({
Expand All @@ -62,9 +63,10 @@ export const HeroBody = ({
handleHighlightDropdownToggle,
notification,
children,
initialSectionType,
}: HeroBodyProps) => {
const [heroSectionType, setHeroSectionType] = useState<HeroSectionType>(
"highlights"
initialSectionType
)
const { onChange } = useEditableContext()

Expand Down Expand Up @@ -147,7 +149,7 @@ export const HeroBody = ({
},
})
}}
defaultValue="highlights"
defaultValue={initialSectionType}
>
<HStack spacing="2rem">
<Radio
Expand Down
11 changes: 5 additions & 6 deletions src/layouts/components/Homepage/HeroDropdownSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ export interface HeroDropdownFormFields {
url: string
}

interface HeroDropdownSectionProps {
interface HeroDropdownSectionProps extends EditorHeroDropdownSection {
errors: {
dropdownElems: HeroDropdownFormFields[]
title: string
dropdown: string
}
state: EditorHeroDropdownSection
title: string
}

export const HeroDropdownSection = ({
errors,
state,
dropdown = { options: [] },
title,
}: HeroDropdownSectionProps) => {
const {
Expand Down Expand Up @@ -67,10 +66,10 @@ export const HeroDropdownSection = ({
<Editable.EmptySection
title="Options you add will appear here"
subtitle="Add options to allow users to quickly navigate your site"
isEmpty={state.dropdown.options.length === 0}
isEmpty={dropdown.options.length === 0}
>
<Editable.Section px={0} spacing="0.75rem" py="1.5rem">
{state.dropdown.options.map(
{dropdown.options.map(
(
{ title: optionTitle, url: optionUrl },
dropdownOptionIndex
Expand Down Expand Up @@ -145,7 +144,7 @@ export const HeroDropdownSection = ({
</Editable.Droppable>
</DragDropContext>
<Button
id={`dropdownelem-${state.dropdown.options.length}-create`}
id={`dropdownelem-${dropdown.options.length}-create`}
onClick={() => onCreate({ target: { id: "dropdownelem" } })}
variant="outline"
w="full"
Expand Down