Skip to content

Commit

Permalink
Merge branch 'master' into fix/unused-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
liady committed Jan 4, 2024
2 parents 5bf9f6c + 1979a19 commit 92d134c
Show file tree
Hide file tree
Showing 41 changed files with 318 additions and 88 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cache-pnpm-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
cache-pnpm-store:
name: Install everything with PNPM and cache it
timeout-minutes: 15
runs-on: ubuntu-latest
env:
UTOPIA_SHA: ${{ github.sha }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-discussion-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Comment To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Build Embeds JSON
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-discussion-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Build Embeds JSON
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-issue-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Build Embeds JSON
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-issue-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Comment To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
if: ${{ !github.event.issue.pull_request }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Build Embeds JSON
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-pr-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Build Merged Args
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-pr-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
if: ${{ github.event.pull_request || github.event.issue.pull_request }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/discord-pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
if: ${{ github.event.review.state == 'approved' || github.event.review.state == 'changes_requested' }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/editor-sharded-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
jobs:
test-editor-karma-shard:
name: Test Editor PR – Karma tests (Shard ${{ inputs.shard_number }})
timeout-minutes: 15
runs-on: ubuntu-latest
env:
UTOPIA_SHA: ${{ github.sha }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/google-webfonts-list-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
jobs:
google-web-fonts-updater:
name: Google Web Fonts Updater
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- name: Checkout code
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/master-pushes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:

test-editor-code:
name: Test Editor - TypeScript, ESLint, dependency-cruiser
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
env:
Expand Down Expand Up @@ -44,6 +45,7 @@ jobs:

test-editor-jest:
name: Test Editor - Jest tests
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
env:
Expand Down Expand Up @@ -97,6 +99,7 @@ jobs:

test-server:
name: Test Server
timeout-minutes: 15
runs-on: ubuntu-latest
env:
UTOPIA_SHA: ${{ github.sha }}
Expand Down Expand Up @@ -137,6 +140,7 @@ jobs:

trigger-deploy:
name: Trigger Deploy
timeout-minutes: 5
needs:
[
test-editor-code,
Expand All @@ -156,6 +160,7 @@ jobs:

post-failure-to-discord:
name: Post Failure Message To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
if: failure()
needs: [trigger-deploy]
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:

test-editor-code:
name: Test Editor PR – TypeScript, ESLint, dependency-cruiser
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
env:
Expand Down Expand Up @@ -41,8 +42,10 @@ jobs:
- name: Run tsc, eslint, depdendency-cruiser and the website tests
if: steps.cache-editor-tests.outputs.cache-hit != 'true'
run: nix-shell --arg includeServerBuildSupport false --arg includeRunLocallySupport false --run check-editor-code-ci

test-editor-jest:
name: Test Editor PR – Jest tests
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
env:
Expand Down Expand Up @@ -96,6 +99,7 @@ jobs:

deploy-staging:
name: Deploy Staging Editor
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
env:
Expand Down Expand Up @@ -212,6 +216,7 @@ jobs:
performance-test:
name: Run Performance Tests
timeout-minutes: 15
runs-on: self-hosted
needs: [deploy-staging, cache-pnpm-store]
env:
Expand Down Expand Up @@ -317,6 +322,7 @@ jobs:

system-test:
name: Run System Tests
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [deploy-staging, cache-pnpm-store]
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/screenshot-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:

take-screenshot:
name: Take Screenshot
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/screenshot-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:

take-screenshot:
name: Take Screenshot
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tag-release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
system-test:
# For automated releases we want to check it is safe first
name: Run System Tests
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [cache-pnpm-store]
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
jobs:
release:
name: Create Release
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
3 changes: 2 additions & 1 deletion editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
"[email protected]": "patches/[email protected]",
"@remix-run/[email protected]": "patches/@[email protected]"
}
}
}
26 changes: 26 additions & 0 deletions editor/patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/dist/esm/routeModules.js b/dist/esm/routeModules.js
index 1b15029f2772719232ddf4ae95a2010163321630..891709ac14f533aad20f54709d00e3d35ee914d7 100644
--- a/dist/esm/routeModules.js
+++ b/dist/esm/routeModules.js
@@ -44,7 +44,7 @@ async function loadRouteModule(route, routeModulesCache) {
// asset we're trying to import! Reload from the server and the user
// (should) get the new manifest--unless the developer purged the static
// assets, the manifest path, but not the documents 😬
- window.location.reload();
+ console.warn('window.location.reload prevented from running.')
return new Promise(() => {
// check out of this hook cause the DJs never gonna re[s]olve this
});
diff --git a/dist/routeModules.js b/dist/routeModules.js
index 5f878eaae5262cc68d6b4599dc887413bf359960..76deff82943c55b7f5f0560f8e8d624e8b4ec53c 100644
--- a/dist/routeModules.js
+++ b/dist/routeModules.js
@@ -66,7 +66,7 @@ async function loadRouteModule(route, routeModulesCache) {
// asset we're trying to import! Reload from the server and the user
// (should) get the new manifest--unless the developer purged the static
// assets, the manifest path, but not the documents 😬
- window.location.reload();
+ console.warn('window.location.reload prevented from running.')
return new Promise(() => {
// check out of this hook cause the DJs never gonna re[s]olve this
});
12 changes: 8 additions & 4 deletions editor/pnpm-lock.yaml

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

6 changes: 4 additions & 2 deletions editor/src/components/canvas/controls/comment-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -446,25 +446,27 @@ const HoveredCommentIndicator = React.memo((props: HoveredCommentIndicatorProps)
width: 250,
boxShadow: UtopiaStyles.shadowStyles.mid.boxShadow,
background: colorTheme.bg1.value,
zIndex: 1,
position: 'fixed',
top: position.y,
// temporarily moving the hovered comment indicator to align with the not hovered version
top: position.y - 40.5,
left: position.x - 3,
overflow: 'hidden',
}}
onMouseDown={onMouseDown}
onClick={onClick}
>
<CommentWrapper
style={{
overflow: 'auto',
background: 'transparent',
}}
data-theme={theme}
user={user}
comment={comment}
showActions={false}
/>
<CommentRepliesCounter thread={thread} />
<div style={{ height: 8 }} />
</div>
)
})
Expand Down
7 changes: 5 additions & 2 deletions editor/src/components/canvas/controls/comment-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -578,15 +578,18 @@ const HeaderComment = React.memo(
top: 0,
left: 0,
right: 0,
backgroundColor: 'white',
zIndex: 1,
boxShadow: UtopiaStyles.shadowStyles.highest.boxShadow,
transition: 'all 100ms linear',
minHeight: 67,
transform: 'scale(1.01)',
}}
>
<CommentWrapper user={user} comment={comment} />
<CommentWrapper
user={user}
comment={comment}
style={{ background: colorTheme.bg1.value, color: colorTheme.fg1.value }}
/>
</div>
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const CommentRepliesCounter = React.memo((props: CommentRepliesCounterPro
paddingLeft: 44,
fontSize: 9,
color: colorTheme.fg6.value,
marginBottom: 8,
}}
>
{repliesCount} {repliesCount > 1 ? 'replies' : 'reply'}
Expand Down
2 changes: 1 addition & 1 deletion editor/src/components/canvas/design-panel-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const RightPane = React.memo<ResizableRightPaneProps>((props) => {
</>,
)}
{when(
isFeatureEnabled('Commenting'),
isFeatureEnabled('Multiplayer'),
<MenuTab
label={'Comments'}
selected={selectedTab === RightMenuTab.Comments}
Expand Down
2 changes: 1 addition & 1 deletion editor/src/components/canvas/multiplayer-presence.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const MultiplayerPresence = React.memo(() => {
<>
<FollowingOverlay />
<MultiplayerShadows />
{when(isFeatureEnabled('Commenting'), <CommentIndicators />)}
<CommentIndicators />
<MultiplayerCursors />
{when(isCommentMode(mode) && mode.comment != null, <CommentPopup />)}
</>
Expand Down
2 changes: 1 addition & 1 deletion editor/src/components/editor/canvas-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ export const CanvasToolbar = React.memo(() => {
/>
</Tooltip>
{when(
isFeatureEnabled('Commenting'),
isFeatureEnabled('Multiplayer'),
<Tooltip title={commentButtonTooltip} placement='bottom'>
<InsertModeButton
testid={CommentModeButtonTestId}
Expand Down
2 changes: 1 addition & 1 deletion editor/src/components/editor/global-shortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ export function handleKeyDown(
return []
},
[COMMENT_SHORTCUT]: () => {
if (isFeatureEnabled('Commenting')) {
if (isFeatureEnabled('Multiplayer')) {
return [
EditorActions.switchEditorMode(EditorModes.commentMode(null, 'not-dragging')),
EditorActions.setRightMenuTab(RightMenuTab.Comments),
Expand Down
Loading

0 comments on commit 92d134c

Please sign in to comment.