Skip to content

Commit fcf86c7

Browse files
authored
Merge pull request #5267 from webiny/release/6.4.2
📦 Release 6.4.2
2 parents 6fbe0ce + ebf6016 commit fcf86c7

13 files changed

Lines changed: 70 additions & 71 deletions

File tree

packages/admin-ui/src/TimeAgo/getElapsedSeconds.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import type { TDate } from "./types.js";
22
import { toEpochMs } from "./toEpochMs.js";
33

44
export function getElapsedSeconds(datetime: TDate, relativeDate?: TDate): number {
5-
const now = relativeDate
6-
? Temporal.Instant.fromEpochMilliseconds(toEpochMs(relativeDate))
7-
: Temporal.Now.instant();
8-
const past = Temporal.Instant.fromEpochMilliseconds(toEpochMs(datetime));
9-
return Math.round(now.since(past).total("second"));
5+
const nowMs = relativeDate ? toEpochMs(relativeDate) : Date.now();
6+
const pastMs = toEpochMs(datetime);
7+
return Math.round((nowMs - pastMs) / 1000);
108
}

packages/api-headless-cms/src/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,17 @@ import {
55
EntryAfterUpdateRevisionDescriptionEvent,
66
EntryBeforeUpdateRevisionDescriptionEvent
77
} from "./events.js";
8-
import { AccessControl, CmsContext } from "~/features/shared/abstractions.js";
9-
import { TenantContext } from "@webiny/api-core/features/tenancy/TenantContext/index.js";
10-
import { IdentityContext } from "@webiny/api-core/features/security/IdentityContext/index.js";
8+
import { AccessControl } from "~/features/shared/abstractions.js";
119
import { GetRevisionByIdUseCase } from "~/features/contentEntry/GetRevisionById/abstractions.js";
1210
import type { CmsEntry, CmsEntryValues, CmsModel } from "~/types/index.js";
13-
import { EntryLockedError, EntryNotAuthorizedError } from "~/domain/contentEntry/errors.js";
11+
import { EntryNotAuthorizedError } from "~/domain/contentEntry/errors.js";
1412
import { UpdateEntryRepository } from "../UpdateEntry/index.js";
1513

1614
class UpdateRevisionDescriptionUseCaseImpl implements UseCaseAbstraction.Interface {
1715
public constructor(
1816
private eventPublisher: EventPublisher.Interface,
1917
private repository: UpdateEntryRepository.Interface,
2018
private accessControl: AccessControl.Interface,
21-
private cmsContext: CmsContext.Interface,
22-
private tenantContext: TenantContext.Interface,
23-
private identityContext: IdentityContext.Interface,
2419
private getRevisionByIdUseCase: GetRevisionByIdUseCase.Interface
2520
) {}
2621

@@ -44,11 +39,6 @@ class UpdateRevisionDescriptionUseCaseImpl implements UseCaseAbstraction.Interfa
4439

4540
const originalEntry = result.value;
4641

47-
// Check if entry is locked
48-
if (originalEntry.locked) {
49-
return Result.fail(new EntryLockedError());
50-
}
51-
5242
const entry = {
5343
...originalEntry,
5444
revisionDescription
@@ -102,13 +92,5 @@ class UpdateRevisionDescriptionUseCaseImpl implements UseCaseAbstraction.Interfa
10292
export const UpdateRevisionDescriptionUseCase = createImplementation({
10393
abstraction: UseCaseAbstraction,
10494
implementation: UpdateRevisionDescriptionUseCaseImpl,
105-
dependencies: [
106-
EventPublisher,
107-
UpdateEntryRepository,
108-
AccessControl,
109-
CmsContext,
110-
TenantContext,
111-
IdentityContext,
112-
GetRevisionByIdUseCase
113-
]
95+
dependencies: [EventPublisher, UpdateEntryRepository, AccessControl, GetRevisionByIdUseCase]
11496
});

packages/app-website-builder/src/BaseEditor/defaultConfig/Content/Preview/PreviewContainer.tsx

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,42 @@ export const PreviewContainer = ({ children }: PreviewContainerProps) => {
1111
const isDragging = useIsDragging();
1212

1313
return (
14-
<div
15-
id={"preview-container"}
16-
style={{ height: `calc(100vh - ${uiHeight}px)` }}
17-
className={
18-
"bg-neutral-subtle relative flex flex-col items-center w-full overflow-auto p-[24px]"
19-
}
20-
>
21-
{isDragging && (
22-
<>
23-
<div
24-
className={
25-
"absolute z-50 pointer-events-none animate-fade-in top-0 left-0 right-0 h-2 bg-[#f9d8ce]"
26-
}
27-
/>
28-
<div
29-
className={
30-
"absolute z-50 pointer-events-none animate-fade-in bottom-0 left-0 right-0 h-2 bg-[#f9d8ce]"
31-
}
32-
/>
33-
<div
34-
className={
35-
"absolute z-50 pointer-events-none animate-fade-in top-0 left-0 bottom-0 w-2 bg-[#f9d8ce]"
36-
}
37-
/>
38-
<div
39-
className={
40-
"absolute z-50 pointer-events-none animate-fade-in top-0 right-0 bottom-0 w-2 bg-[#f9d8ce]"
41-
}
42-
/>
43-
</>
44-
)}
45-
{children}
46-
</div>
14+
<>
15+
<div className={"relative"}>
16+
<div
17+
id={"preview-container"}
18+
style={{ height: `calc(100vh - ${uiHeight}px)` }}
19+
className={
20+
"bg-neutral-subtle relative flex flex-col items-center w-full overflow-auto p-[24px]"
21+
}
22+
>
23+
{children}
24+
</div>
25+
{isDragging && (
26+
<>
27+
<div
28+
className={
29+
"absolute z-50 pointer-events-none animate-fade-in top-0 left-0 right-0 h-2 bg-[#f9d8ce]"
30+
}
31+
/>
32+
<div
33+
className={
34+
"absolute z-50 pointer-events-none animate-fade-in bottom-0 left-0 right-0 h-2 bg-[#f9d8ce]"
35+
}
36+
/>
37+
<div
38+
className={
39+
"absolute z-50 pointer-events-none animate-fade-in top-0 left-0 bottom-0 w-2 bg-[#f9d8ce]"
40+
}
41+
/>
42+
<div
43+
className={
44+
"absolute z-50 pointer-events-none animate-fade-in top-0 right-0 bottom-0 w-2 bg-[#f9d8ce]"
45+
}
46+
/>
47+
</>
48+
)}
49+
</div>
50+
</>
4751
);
4852
};

packages/app-website-builder/src/inputRenderers/FileInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const FileInputRenderer = ({
3838
onChange={onFileChange}
3939
render={({ showFileManager }) => (
4040
<FilePicker
41+
variant={"secondary"}
4142
label={label}
4243
description={input.description}
4344
type="compact"

packages/app-website-builder/src/inputRenderers/FragmentSelectorInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export const FragmentSelectorInputRenderer = ({
2828

2929
return (
3030
<Select
31+
size={"md"}
32+
variant={"secondary"}
3133
value={value}
3234
onChange={newValue => {
3335
onChange(({ value }) => {

packages/app-website-builder/src/inputRenderers/NumberInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export const NumberInputRenderer = ({
2727
return (
2828
<Input
2929
type={"number"}
30+
size={"md"}
31+
variant={"secondary"}
3032
value={value}
3133
onChange={localOnChange}
3234
label={label}

packages/app-website-builder/src/inputRenderers/SelectInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export const SelectInputRenderer = ({
1212
const input = props.input as SelectInput;
1313
return (
1414
<Select
15+
size={"md"}
16+
variant={"secondary"}
1517
value={value}
1618
onChange={newValue => {
1719
onChange(({ value }) => {

packages/app-website-builder/src/inputRenderers/TextareaInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export const TextareaInputRenderer = ({
2323

2424
return (
2525
<Textarea
26+
size={"md"}
27+
variant={"secondary"}
2628
value={value || ""}
2729
onChange={previewValue}
2830
onBlur={e => commitValue(e.currentTarget.value)}

packages/build-tools/bundling/importValidatorPlugin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ const whitelist = [
1111
"@webiny/okta",
1212
"@webiny/plugins",
1313
"@webiny/sdk",
14-
"@webiny/stdlib"
14+
"@webiny/stdlib",
15+
"@webiny/lexical-converter",
16+
"@webiny/lexical-nodes",
17+
"@webiny/lexical-theme"
1518
];
1619

1720
export const createImportValidatorPlugin = () => {

packages/telemetry/cli.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ export const sendEvent = async ({ event, version, properties }) => {
1111
return;
1212
}
1313

14-
// The WTS client reads the machine id from `~/.webiny/config` (user.id field)
15-
// via the same path globalConfig writes to. No need to pass user explicitly.
16-
const wts = new WTS({ source: "cli" });
14+
// Use the canonical Webiny machine id — the top-level `id` field in
15+
// `~/.webiny/config`, owned by @webiny/global-config. The admin app
16+
// (REACT_APP_WEBINY_TELEMETRY_USER_ID) and the website install/finish alias
17+
// both key off this same id, so passing it here keeps CLI, admin, and
18+
// website events on a single PostHog person. Without it, the WTS client
19+
// falls back to its own `user.id` field, which is a different UUID and
20+
// fragments funnels across surfaces.
21+
const wts = new WTS({ source: "cli", distinctId: globalConfig.get("id") });
1722

1823
const wcpProperties = {};
1924
const [wcpOrgId, wcpProjectId] = getWcpOrgProjectId();

0 commit comments

Comments
 (0)