Skip to content

Commit

Permalink
Merge pull request #9176 from weseek/master
Browse files Browse the repository at this point in the history
Release v7.0.21
  • Loading branch information
mergify[bot] authored Oct 15, 2024
2 parents 044230a + d30e52d commit 3672d5d
Show file tree
Hide file tree
Showing 40 changed files with 287 additions and 170 deletions.
1 change: 0 additions & 1 deletion .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pull_request_rules:
- '#approved-reviews-by >= 1'
- '#changes-requested-reviews-by = 0'
- '#review-requested = 0'
- check-success = check-title
actions:
queue:

Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/ci-app-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ on:
- '!apps/app/docker/**'
- packages/**
pull_request:
branches:
- master
- dev/7.*.x
- dev/6.*.x
- release/*
types: [opened, reopened, synchronize]
paths:
- .github/mergify.yml
Expand All @@ -47,6 +42,12 @@ jobs:

test-prod-node18:
uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master
if: |
( github.event_name == 'push'
|| github.base_ref == 'master'
|| github.base_ref == 'dev/7.*.x'
|| startsWith( github.base_ref, 'release/' )
|| startsWith( github.head_ref, 'mergify/merge-queue/' ))
with:
node-version: 18.x
skip-e2e-test: true
Expand All @@ -56,6 +57,12 @@ jobs:

test-prod-node20:
uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master
if: |
( github.event_name == 'push'
|| github.base_ref == 'master'
|| github.base_ref == 'dev/7.*.x'
|| startsWith( github.base_ref, 'release/' )
|| startsWith( github.head_ref, 'mergify/merge-queue/' ))
with:
node-version: 20.x
skip-e2e-test: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) }}
Expand Down
3 changes: 1 addition & 2 deletions apps/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@growi/app",
"version": "7.0.20",
"version": "7.0.21-RC.0",
"license": "MIT",
"private": "true",
"scripts": {
Expand Down Expand Up @@ -265,7 +265,6 @@
"null-loader": "^4.0.1",
"plantuml-encoder": "^1.2.5",
"pretty-bytes": "^6.1.1",
"react-codemirror2": "^6.0.0",
"react-copy-to-clipboard": "^5.0.1",
"react-dnd": "^14.0.5",
"react-dnd-html5-backend": "^14.1.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/app/public/static/locales/en_US/commons.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,6 @@
"publish_transfer_key": "Publish transfer key",
"transfer_key_limit": "Transfer keys are valid for 1 hour after issuance.",
"once_transfer_key_used": "Once the transfer key is used for transfer, it cannot be used for any other transfer.",
"transfer_to_growi_cloud": "For more details, please click <a href='{{documentationUrl}}/ja/admin-guide/management-cookbook/g2g-transfer.html'>here.</a>"
"transfer_to_growi_cloud": "For more details, please click <a href='{{documentationUrl}}en/admin-guide/management-cookbook/g2g-transfer.html'>here.</a>"
}
}
1 change: 1 addition & 0 deletions apps/app/public/static/locales/en_US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"Presentation Mode": "Presentation",
"Not available for guest": "Not available for guest",
"Not available in this version": "Not available in this version",
"Not available when \"anyone with the link\" is selected": "If \"anyone with the link\" is selected, the scope cannot be overridden.",
"No users have liked this yet": "No users have liked this yet",
"No users have liked this yet.": "No users have liked this yet.",
"No users have bookmarked yet": "No users have bookmarked yet",
Expand Down
2 changes: 1 addition & 1 deletion apps/app/public/static/locales/fr_FR/commons.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,6 @@
"publish_transfer_key": "Publier la clé de transfert",
"transfer_key_limit": "Les clés de transfert sont valides durant une heure.",
"once_transfer_key_used": "Les clés de transfert sont à usage unique.",
"transfer_to_growi_cloud": "Pour plus de détails, veuillez cliquer <a href='{{documentationUrl}}/ja/admin-guide/management-cookbook/g2g-transfer.html'>ici.</a>"
"transfer_to_growi_cloud": "Pour plus de détails, veuillez cliquer <a href='{{documentationUrl}}en/admin-guide/management-cookbook/g2g-transfer.html'>ici.</a>"
}
}
1 change: 1 addition & 0 deletions apps/app/public/static/locales/fr_FR/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"Presentation Mode": "Mode présentation",
"Not available for guest": "Indisponible pour les invités",
"Not available in this version": "Indisponible dans cette version",
"Not available when \"anyone with the link\" is selected": "Si \"Tous les utilisateurs disposant du lien\" est sélectionné, la portée ne peut pas être modifiée",
"No users have liked this yet": "Aucun utilisateur n'a aimé cette page",
"No users have liked this yet.": "Aucun utilisateur n'a aimé cette page.",
"No users have bookmarked yet": "Aucun utilisateur n'a mis en favoris cette page",
Expand Down
2 changes: 1 addition & 1 deletion apps/app/public/static/locales/ja_JP/commons.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@
"publish_transfer_key": "移行キーを発行する",
"transfer_key_limit": "※ 移行キーの有効期限は発行から1時間となります。",
"once_transfer_key_used": "※ 移行キーは一度移行に利用するとそれ以降はご利用いただけなくなります。",
"transfer_to_growi_cloud": "※ 詳しくは <a href='{{documentationUrl}}/ja/admin-guide/management-cookbook/g2g-transfer.html'> GROWI お引越し機能</a>をご確認ください。"
"transfer_to_growi_cloud": "※ 詳しくは <a href='{{documentationUrl}}ja/admin-guide/management-cookbook/g2g-transfer.html'> GROWI お引越し機能</a>をご確認ください。"
}
}
1 change: 1 addition & 0 deletions apps/app/public/static/locales/ja_JP/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"Presentation Mode": "プレゼンテーション",
"Not available for guest": "ゲストユーザーは利用できません",
"Not available in this version": "このバージョンでは利用できません",
"Not available when \"anyone with the link\" is selected": "「リンクを知っている人のみ」を選択している場合はスコープを上書きできません。",
"No users have liked this yet": "いいねをしているユーザーはいません",
"No users have bookmarked yet": "ブックマークしているユーザーはいません",
"Create Archive Page": "アーカイブページの作成",
Expand Down
2 changes: 1 addition & 1 deletion apps/app/public/static/locales/zh_CN/commons.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@
"publish_transfer_key": "发布迁移密钥",
"transfer_key_limit": "迁移密钥在签发后一小时内有效。",
"once_transfer_key_used": "一旦迁移密钥被用于迁移,它将不再可用于进一步的迁移。",
"transfer_to_growi_cloud": "有关更多详情,请点击<a href='https://{{documentationUrl}}/ja/admin-guide/management-cookbook/g2g-transfer.html'>此处</a>。"
"transfer_to_growi_cloud": "有关更多详情,请点击<a href='{{documentationUrl}}en/admin-guide/management-cookbook/g2g-transfer.html'>此处</a>。"
}
}
1 change: 1 addition & 0 deletions apps/app/public/static/locales/zh_CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"Presentation Mode": "演示文稿",
"Not available for guest": "不提供给客人",
"Not available in this version": "此版本中不提供",
"Not available when \"anyone with the link\" is selected": "如果选择“任何人”,则无法覆盖范围",
"No users have liked this yet": "还没有用户喜欢这个",
"No users have bookmarked yet": "还没有用户加入书签",
"Create Archive Page": "创建归档页",
Expand Down
5 changes: 3 additions & 2 deletions apps/app/src/client/components/DescendantsPageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { OnDeletedFunction, OnPutBackedFunction } from '~/interfaces/ui';
import { useIsGuestUser, useIsReadOnlyUser, useIsSharedUser } from '~/stores-universal/context';
import {
mutatePageTree,
useSWRxPageInfoForList, useSWRxPageList,
useSWRxPageInfoForList, useSWRxPageList, mutateRecentlyUpdated,
} from '~/stores/page-listing';

import type { ForceHideMenuItems } from './Common/Dropdown/PageItemControl';
Expand Down Expand Up @@ -67,7 +67,7 @@ const DescendantsPageListSubstance = (props: SubstanceProps): JSX.Element => {
else {
toastSuccess(t('deleted_pages_completely', { path }));
}

mutateRecentlyUpdated();
mutatePageTree();
if (onPagesDeleted != null) {
onPagesDeleted(...args);
Expand All @@ -77,6 +77,7 @@ const DescendantsPageListSubstance = (props: SubstanceProps): JSX.Element => {
const pagePutBackedHandler: OnPutBackedFunction = useCallback((path) => {
toastSuccess(t('page_has_been_reverted', { path }));

mutateRecentlyUpdated();
mutatePageTree();
if (onPagePutBacked != null) {
onPagePutBacked(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import {
useSWRMUTxCurrentPage, useCurrentPageId, useSWRxPageInfo,
} from '~/stores/page';
import { mutatePageTree } from '~/stores/page-listing';
import { mutatePageTree, mutateRecentlyUpdated } from '~/stores/page-listing';
import {
useIsAbleToShowPageManagement,
useIsAbleToChangeEditorMode,
Expand Down Expand Up @@ -271,6 +271,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
mutateCurrentPage();
mutatePageInfo();
mutatePageTree();
mutateRecentlyUpdated();
};
openRenameModal(page, { onRenamed: renamedHandler });
}, [mutateCurrentPage, mutatePageInfo, openRenameModal]);
Expand All @@ -294,6 +295,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
mutateCurrentPage();
mutatePageInfo();
mutatePageTree();
mutateRecentlyUpdated();
};
openDeleteModal([pageWithMeta], { onDeleted: deletedHandler });
}, [currentPathname, mutateCurrentPage, openDeleteModal, router, mutatePageInfo]);
Expand Down
3 changes: 2 additions & 1 deletion apps/app/src/client/components/NotAvailable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';

import { Disable } from 'react-disable';
import { UncontrolledTooltip, UncontrolledTooltipProps } from 'reactstrap';
import type { UncontrolledTooltipProps } from 'reactstrap';
import { UncontrolledTooltip } from 'reactstrap';

type NotAvailableProps = {
children: JSX.Element
Expand Down
4 changes: 3 additions & 1 deletion apps/app/src/client/components/PageEditor/PageEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
import {
useCurrentPagePath, useSWRxCurrentPage, useCurrentPageId, useIsNotFound, useTemplateBodyData, useSWRxCurrentGrantData,
} from '~/stores/page';
import { mutatePageTree } from '~/stores/page-listing';
import { mutatePageTree, mutateRecentlyUpdated } from '~/stores/page-listing';
import { usePreviewOptions } from '~/stores/renderer';
import { useIsUntitledPage, useSelectedGrant } from '~/stores/ui';
import { useEditingUsers } from '~/stores/use-editing-users';
Expand Down Expand Up @@ -190,6 +190,8 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {

// to sync revision id with page tree: https://github.com/weseek/growi/pull/7227
mutatePageTree();

mutateRecentlyUpdated();
// sync current grant data after update
mutateIsGrantNormalized();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useTranslation } from 'next-i18next';
import { apiv3Put } from '~/client/util/apiv3-client';
import { toastSuccess, toastError } from '~/client/util/toastr';
import { useSWRMUTxCurrentPage } from '~/stores/page';
import { mutatePageTree, mutatePageList } from '~/stores/page-listing';
import { mutatePageTree, mutatePageList, mutateRecentlyUpdated } from '~/stores/page-listing';
import { useIsUntitledPage } from '~/stores/ui';


Expand All @@ -33,6 +33,7 @@ export const usePagePathRenameHandler = (

const onRenamed = (fromPath: string | undefined, toPath: string) => {
mutatePageTree();
mutateRecentlyUpdated();
mutatePageList();
mutateIsUntitledPage(false);

Expand Down
30 changes: 23 additions & 7 deletions apps/app/src/client/components/SavePageControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useCallback, useState, useEffect } from 'react';

import type EventEmitter from 'events';

import { PageGrant } from '@growi/core';
import { isTopPage, isUsersProtectedPages } from '@growi/core/dist/utils/page-path-utils';
import { LoadingSpinner } from '@growi/ui/dist/components';
import { useTranslation } from 'next-i18next';
Expand All @@ -17,9 +18,10 @@ import {
import { useEditorMode } from '~/stores-universal/ui';
import { useWaitingSaveProcessing, useSWRxSlackChannels, useIsSlackEnabled } from '~/stores/editor';
import { useSWRxCurrentPage, useCurrentPagePath } from '~/stores/page';
import { useIsDeviceLargerThanMd } from '~/stores/ui';
import { useIsDeviceLargerThanMd, useSelectedGrant } from '~/stores/ui';
import loggerFactory from '~/utils/logger';

import { NotAvailable } from './NotAvailable';
import { GrantSelector } from './SavePageControls/GrantSelector';
import { SlackNotification } from './SlackNotification';

Expand All @@ -38,6 +40,7 @@ const SavePageButton = (props: {slackChannels: string, isSlackEnabled?: boolean,
const { t } = useTranslation();
const { data: _isWaitingSaveProcessing } = useWaitingSaveProcessing();
const [isSavePageModalShown, setIsSavePageModalShown] = useState<boolean>(false);
const { data: selectedGrant } = useSelectedGrant();

const { slackChannels, isSlackEnabled, isDeviceLargerThanMd } = props;

Expand All @@ -63,6 +66,7 @@ const SavePageButton = (props: {slackChannels: string, isSlackEnabled?: boolean,
const labelSubmitButton = t('Update');
const labelOverwriteScopes = t('page_edit.overwrite_scopes', { operation: labelSubmitButton });
const labelUnpublishPage = t('wip_page.save_as_wip');
const restrictedGrantOverrideErrorTitle = t('Not available when "anyone with the link" is selected');

return (
<>
Expand All @@ -85,9 +89,15 @@ const SavePageButton = (props: {slackChannels: string, isSlackEnabled?: boolean,
<>
<DropdownToggle caret color="primary" disabled={isWaitingSaveProcessing} />
<DropdownMenu container="body" end>
<DropdownItem onClick={saveAndOverwriteScopesOfDescendants}>
{labelOverwriteScopes}
</DropdownItem>
<NotAvailable
isDisabled={selectedGrant?.grant === PageGrant.GRANT_RESTRICTED}
classNamePrefix="grw-not-available-when-grant-restricted-is-selected"
title={restrictedGrantOverrideErrorTitle}
>
<DropdownItem onClick={saveAndOverwriteScopesOfDescendants}>
{labelOverwriteScopes}
</DropdownItem>
</NotAvailable>
<DropdownItem onClick={saveAndMakeWip}>
{labelUnpublishPage}
</DropdownItem>
Expand All @@ -102,9 +112,15 @@ const SavePageButton = (props: {slackChannels: string, isSlackEnabled?: boolean,
toggle={() => setIsSavePageModalShown(false)}
>
<div className="d-flex flex-column pt-4 pb-3 px-4 gap-4">
<button type="button" className="btn btn-primary" onClick={() => { setIsSavePageModalShown(false); saveAndOverwriteScopesOfDescendants() }}>
{labelOverwriteScopes}
</button>
<NotAvailable
isDisabled={selectedGrant?.grant === PageGrant.GRANT_RESTRICTED}
classNamePrefix="grw-not-available-when-grant-restricted-is-selected"
title={restrictedGrantOverrideErrorTitle}
>
<button type="button" className="btn btn-primary" onClick={() => { setIsSavePageModalShown(false); saveAndOverwriteScopesOfDescendants() }}>
{labelOverwriteScopes}
</button>
</NotAvailable>
<button type="button" className="btn btn-primary" onClick={() => { setIsSavePageModalShown(false); saveAndMakeWip() }}>
{labelUnpublishPage}
</button>
Expand Down
3 changes: 2 additions & 1 deletion apps/app/src/client/components/SearchPage/SearchPageBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
useIsGuestUser, useIsReadOnlyUser, useIsSearchServiceConfigured, useIsSearchServiceReachable,
} from '~/stores-universal/context';
import { usePageDeleteModal } from '~/stores/modal';
import { mutatePageTree } from '~/stores/page-listing';
import { mutatePageTree, mutateRecentlyUpdated } from '~/stores/page-listing';

import type { ForceHideMenuItems } from '../Common/Dropdown/PageItemControl';

Expand Down Expand Up @@ -275,6 +275,7 @@ export const usePageDeleteModalForBulkDeletion = (
toastSuccess(t('deleted_pages_completely', { path }));
}
mutatePageTree();
mutateRecentlyUpdated();

if (onDeleted != null) {
onDeleted(...args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useCurrentUser } from '~/stores-universal/context';
import {
usePageDuplicateModal, usePageRenameModal, usePageDeleteModal,
} from '~/stores/modal';
import { mutatePageList, mutatePageTree } from '~/stores/page-listing';
import { mutatePageList, mutatePageTree, mutateRecentlyUpdated } from '~/stores/page-listing';
import { useSearchResultOptions } from '~/stores/renderer';
import { mutateSearching } from '~/stores/search';

Expand Down Expand Up @@ -135,6 +135,7 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
toastSuccess(t('duplicated_pages', { fromPath }));

mutatePageTree();
mutateRecentlyUpdated();
mutateSearching();
mutatePageList();
};
Expand All @@ -146,6 +147,7 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
toastSuccess(t('renamed_pages', { path }));

mutatePageTree();
mutateRecentlyUpdated();
mutateSearching();
mutatePageList();
};
Expand All @@ -165,6 +167,7 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
toastSuccess(t('deleted_pages', { path }));
}
mutatePageTree();
mutateRecentlyUpdated();
mutateSearching();
mutatePageList();
}, [t]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { ISelectable, ISelectableAll } from '~/client/interfaces/selectable
import { toastSuccess } from '~/client/util/toastr';
import type { IPageSearchMeta, IPageWithSearchMeta } from '~/interfaces/search';
import { useIsGuestUser, useIsReadOnlyUser } from '~/stores-universal/context';
import { mutatePageTree, useSWRxPageInfoForList } from '~/stores/page-listing';
import { mutatePageTree, useSWRxPageInfoForList, mutateRecentlyUpdated } from '~/stores/page-listing';
import { mutateSearching } from '~/stores/search';

import type { ForceHideMenuItems } from '../Common/Dropdown/PageItemControl';
Expand Down Expand Up @@ -94,13 +94,15 @@ const SearchResultListSubstance: ForwardRefRenderFunction<ISelectableAll, Props>
toastSuccess(t('duplicated_pages', { fromPath }));

mutatePageTree();
mutateRecentlyUpdated();
mutateSearching();
}, [t]);

const renamedHandler = useCallback((path) => {
toastSuccess(t('renamed_pages', { path }));

mutatePageTree();
mutateRecentlyUpdated();
mutateSearching();
}, [t]);

Expand All @@ -118,6 +120,7 @@ const SearchResultListSubstance: ForwardRefRenderFunction<ISelectableAll, Props>
toastSuccess(t('deleted_pages', { path }));
}
mutatePageTree();
mutateRecentlyUpdated();
mutateSearching();
}, [t]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { debounce } from 'throttle-debounce';
import { useTargetAndAncestors, useIsGuestUser, useIsReadOnlyUser } from '~/stores-universal/context';
import { useCurrentPagePath, useCurrentPageId } from '~/stores/page';
import {
mutatePageTree, useSWRxPageAncestorsChildren, useSWRxRootPage, useSWRxV5MigrationStatus,
mutatePageTree, mutateRecentlyUpdated, useSWRxPageAncestorsChildren, useSWRxRootPage, useSWRxV5MigrationStatus,
} from '~/stores/page-listing';
import { useSidebarScrollerRef } from '~/stores/ui';
import loggerFactory from '~/utils/logger';
Expand All @@ -35,6 +35,7 @@ export const PageTreeHeader = memo(({ isWipPageShown, onWipPageShownChange }: He
const mutate = useCallback(() => {
mutateRootPage();
mutatePageTree();
mutateRecentlyUpdated();
}, [mutateRootPage]);

return (
Expand Down
Loading

0 comments on commit 3672d5d

Please sign in to comment.