Skip to content

Commit

Permalink
Merge pull request #1200 from isomerpages/release/0.20.0
Browse files Browse the repository at this point in the history
Release/0.20.0
  • Loading branch information
alexanderleegs authored Mar 16, 2023
2 parents 0363338 + a7cce8a commit 8c81553
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 21 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@ 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.20.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.19.0...v0.20.0)

- fix: allow @ in youtube link [`#1193`](https://github.com/isomerpages/isomercms-frontend/pull/1193)
- chore(permalinks): change permalink to lowercase [`#1191`](https://github.com/isomerpages/isomercms-frontend/pull/1191)
- Chore(deps): Bump @braintree/sanitize-url from 6.0.0 to 6.0.1 [`#1189`](https://github.com/isomerpages/isomercms-frontend/pull/1189)
- style: remove fixed widths in sites dashboard [`#1185`](https://github.com/isomerpages/isomercms-frontend/pull/1185)
- release(0.19.0): merge to develop [`#1177`](https://github.com/isomerpages/isomercms-frontend/pull/1177)

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

> 9 January 2023
- Fix/frontmatter for link resources [`#1174`](https://github.com/isomerpages/isomercms-frontend/pull/1174)
- Chore(deps): Bump json5 from 1.0.1 to 1.0.2 [`#1175`](https://github.com/isomerpages/isomercms-frontend/pull/1175)
- Chore(deps): Bump express from 4.17.1 to 4.18.2 [`#1171`](https://github.com/isomerpages/isomercms-frontend/pull/1171)
Expand Down Expand Up @@ -67,13 +77,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Chore(deps): Bump moment-timezone from 0.5.33 to 0.5.35 [`#1043`](https://github.com/isomerpages/isomercms-frontend/pull/1043)
- Fix: useUpdateDirectoryHook invalidate query [`#1042`](https://github.com/isomerpages/isomercms-frontend/pull/1042)
- release(v0.14.0): merge to develop [`#1040`](https://github.com/isomerpages/isomercms-frontend/pull/1040)
- fix(reorderingmodal): removed chakra.button from folderItem [`#1036`](https://github.com/isomerpages/isomercms-frontend/pull/1036)
- fix(e2e-tests): update e2e tests [`#1035`](https://github.com/isomerpages/isomercms-frontend/pull/1035)

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

> 25 August 2022
> 29 August 2022
- fix(reorderingmodal): removed chakra.button from folderItem [`#1036`](https://github.com/isomerpages/isomercms-frontend/pull/1036)
- fix(e2e-tests): update e2e tests [`#1035`](https://github.com/isomerpages/isomercms-frontend/pull/1035)
- fix(deletion hooks): update query keys for useDelete hooks [`#1027`](https://github.com/isomerpages/isomercms-frontend/pull/1027)
- feat(resourceroom): allow users to update resource room name [`#988`](https://github.com/isomerpages/isomercms-frontend/pull/988)
- ref(storybook): add page-level stories [`#980`](https://github.com/isomerpages/isomercms-frontend/pull/980)
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "isomercms-frontend",
"version": "0.19.0",
"version": "0.20.0",
"private": true,
"dependencies": {
"@atlaskit/tree": "^7.0.2",
"@braintree/sanitize-url": "^6.0.0",
"@braintree/sanitize-url": "^6.0.1",
"@chakra-ui/react": "^1.8.3",
"@chakra-ui/theme": "^2.0.3",
"@chakra-ui/theme-tools": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("Utils test", () => {
resourceRoomName,
resourceCategoryName,
}
const examplePermalink = `/${resourceRoomName}/${resourceCategoryName}/permalink`
const examplePermalink = `/${resourceRoomName}/${resourceCategoryName}/permalink`.toLowerCase()

expect(getDefaultFrontMatter(params, [])).toMatchObject({
title: exampleTitle,
Expand All @@ -79,7 +79,7 @@ describe("Utils test", () => {
resourceCategoryName,
}
const exampleResourceTitle = `${exampleDate}-${exampleLayout}-${exampleTitle}`
const examplePermalink = `/${resourceRoomName}/${resourceCategoryName}/permalink`
const examplePermalink = `/${resourceRoomName}/${resourceCategoryName}/permalink`.toLowerCase()

expect(
getDefaultFrontMatter(params, [
Expand Down
3 changes: 3 additions & 0 deletions src/components/PageSettingsModal/PageSettingsSchema.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const PageSettingsSchema = (existingTitlesArray = []) =>
permalinkRegexTest,
"Permalink should start with a slash, and contain alphanumeric characters separated by hyphens and slashes only"
)
.test("is-lowercase", "Permalink must be lowercase", (value) => {
return value === value.toLowerCase()
})
}
}),
layout: Yup.string().oneOf(["file", "post", "link"]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const generateDefaultFrontMatter = (
const resourceCategoryPermalink = slugify(resourceCategoryName)
? `${slugify(resourceCategoryName)}`
: "unrecognised/"
const examplePermalink = `/${resourceRoomPermalink}/${resourceCategoryPermalink}/permalink`
const examplePermalink = `/${resourceRoomPermalink}/${resourceCategoryPermalink}/permalink`.toLowerCase()
return {
title: exampleTitle,
permalink: examplePermalink,
Expand Down
3 changes: 3 additions & 0 deletions src/layouts/Settings/SocialMediaSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
URL_REGEX_SUFFIX,
TIKTOK_REGEX,
TELEGRAM_REGEX,
YOUTUBE_REGEX,
} from "utils/validators"

import { SiteSettings } from "types/settings"
Expand Down Expand Up @@ -94,6 +95,8 @@ const getRegExp = (
label: StringKeyOf<SiteSettings["socialMediaContent"]>
): RegExp => {
switch (label) {
case "youtube":
return RegExp(`${URL_REGEX_PREFIX}${label}${YOUTUBE_REGEX}`)
case "telegram":
return RegExp(`${URL_REGEX_PREFIX}${TELEGRAM_REGEX}`)
case "tiktok":
Expand Down
19 changes: 10 additions & 9 deletions src/styles/isomer-cms/pages/Sites.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@import "../elements/variable";

@mixin single-site {
margin-left: $site-margin-horizontal;
margin-right: $site-margin-horizontal;
margin-top: $site-margin-vertical;
margin-bottom: $site-margin-vertical;
height: $site-height;
Expand All @@ -12,16 +10,20 @@

.sitesContainer {
width: 100%;
max-width: $sites-container-width;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
align-items: flex-start;
margin-top: 30px;
margin-left: auto;
margin-right: auto;
padding-left: 16px;
padding-right: 16px;

.sectionHeader {
width: $sites-container-width;
margin-left: $site-margin-horizontal * 2;


.sectionTitle {
font-size: 28px;
Expand All @@ -32,22 +34,21 @@

.sites {
display: flex;
flex-direction: rows;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: wrap;
width: $sites-container-width;
column-gap: 32px;

.infoText {
margin-top: $site-margin-vertical;
margin-left: $site-margin-horizontal;
}

.siteContainer {
// width: 33.33%;
box-sizing: border-box;
display: flex;
flex-direction: rows;
flex-direction: row;
justify-content: center;
align-items: center;

Expand Down
1 change: 1 addition & 0 deletions src/utils/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ export const getDefaultFrontMatter = (params, existingTitles) => {
}`
}
examplePermalink += `permalink`
examplePermalink = examplePermalink.toLowerCase()
if (!resourceRoomName)
return {
title: exampleTitle,
Expand Down
1 change: 1 addition & 0 deletions src/utils/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
const PERMALINK_REGEX = "^((/([a-zA-Z0-9]+-)*[a-zA-Z0-9]+)+)/?$"
export const URL_REGEX_PREFIX = "^(https://)?(www.)?("
export const URL_REGEX_SUFFIX = ".com/)([a-zA-Z0-9_-]+([/.])?)+$"
export const YOUTUBE_REGEX = ".com/(@)?)([a-zA-Z0-9_-]+([/.])?)+$"
export const TELEGRAM_REGEX = "telegram|t).me/([a-zA-Z0-9_-]+([/.])?)+$"
export const TIKTOK_REGEX = ".com/@)([a-zA-Z0-9_-]+([/.])?)+$"
// Domain name regex (source: https://regexr.com/3au3g and https://stackoverflow.com/a/30007882)
Expand Down

0 comments on commit 8c81553

Please sign in to comment.