Merge remote-tracking branch 'origin/develop' into staging

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-12-07 22:59:58 +07:00
commit 3ffa8627a9
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2
11 changed files with 319 additions and 275 deletions

File diff suppressed because it is too large Load Diff

View File

@ -22,8 +22,8 @@
"@vercel/webpack-asset-relocator-loader": "^1.7.3",
"node-loader": "~2.0.0",
"cross-env": "~7.0.3",
"webpack-cli": "^5.0.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.1.4",
"webpack": "^5.97.1",
"mini-css-extract-plugin": "^2.2.0",
"dotenv-webpack": "^8.0.1",
"ts-loader": "^9.2.5",
@ -33,7 +33,7 @@
"style-loader": "^3.3.1",
"file-loader": "^6.2.0",
"sass-loader": "^13.2.0",
"webpack-bundle-analyzer": "^4.7.0",
"webpack-bundle-analyzer": "^4.10.2",
"svgo-loader": "^3.0.0",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.20",

View File

@ -7,7 +7,7 @@
"_phase:package": "rushx package",
"_phase:validate": "compile validate",
"package": "rm -rf ./dist && cross-env NODE_ENV=production webpack --stats-error-details && echo 'done'",
"analyze": "cross-env NODE_ENV=production webpack --json > stats.json",
"analyze": "rm -rf ./dist && cross-env NODE_ENV=production webpack --profile --json > stats.json",
"show": "webpack-bundle-analyzer stats.json dist",
"dev-server": "cross-env USE_CACHE=false CLIENT_TYPE=dev-server webpack serve",
"dev-server-cache": "cross-env USE_CACHE=true CLIENT_TYPE=dev-server webpack serve",
@ -22,8 +22,8 @@
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"cross-env": "~7.0.3",
"webpack-cli": "^5.0.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.1.4",
"webpack": "^5.97.1",
"mini-css-extract-plugin": "^2.2.0",
"dotenv-webpack": "^8.0.1",
"ts-loader": "^9.2.5",
@ -34,7 +34,7 @@
"file-loader": "^6.2.0",
"sass-loader": "^13.2.0",
"@types/node": "~20.11.16",
"webpack-bundle-analyzer": "^4.7.0",
"webpack-bundle-analyzer": "^4.10.2",
"svgo-loader": "^3.0.0",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.20",

View File

@ -35,6 +35,9 @@ const doValidate = !prod || (process.env.DO_VALIDATE === 'true')
const useCache = process.env.USE_CACHE === 'true'
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
/**
* @type {Configuration}
*/
@ -118,26 +121,14 @@ module.exports = [
new EsbuildPlugin({ target: 'es2021' })
],
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all'
}
}
chunks: 'all'
}
} : {
minimize: false,
mangleExports: false,
usedExports: false,
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all'
}
}
chunks: 'all'
}
},
module: {
@ -275,6 +266,10 @@ module.exports = [
},
mode,
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false,
}),
new HtmlWebpackPlugin({
meta: {
viewport: 'width=device-width, initial-scale=1.0'

View File

@ -42,7 +42,7 @@
</script>
<div class="hulyComponent">
<Header allowFullsize adaptive={'disabled'}>
<Header adaptive={'disabled'}>
<Breadcrumb title={selectedFloor?.name ?? ''} size={'large'} isCurrent />
<svelte:fragment slot="beforeTitle">
<ViewletSelector bind:viewlet bind:preference bind:loading viewletQuery={{ attachTo: lovePlg.class.Floor }} />

View File

@ -69,7 +69,6 @@
configure={configure && floor?._id === _floor._id}
rooms={getRooms($rooms, _floor._id)}
selected={floor?._id === _floor._id}
background={'var(--theme-navpanel-color)'}
on:configure={() => {
if (floor?._id === _floor._id) {
configure = !configure

View File

@ -13,6 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import { createEventDispatcher } from 'svelte'
import core, { getCurrentAccount, type Ref } from '@hcengineering/core'
import { createQuery } from '@hcengineering/presentation'
import { Scroller, deviceOptionsStore as deviceInfo } from '@hcengineering/ui'
@ -27,6 +28,8 @@
export let apps: Application[] = []
export let direction: 'vertical' | 'horizontal' = 'vertical'
const dispatch = createEventDispatcher()
let loaded: boolean = false
let hiddenAppsIds: Array<Ref<Application>> = []
const hiddenAppsIdsQuery = createQuery()
@ -66,9 +69,7 @@
label={app.label}
navigator={app._id === active && $deviceInfo.navigator.visible}
on:click={() => {
if (app._id === active) {
$deviceInfo.navigator.visible = !$deviceInfo.navigator.visible
}
if (app._id === active) dispatch('toggleNav')
}}
/>
</NavLink>
@ -82,9 +83,7 @@
label={app.label}
navigator={app._id === active && $deviceInfo.navigator.visible}
on:click={() => {
if (app._id === active) {
$deviceInfo.navigator.visible = !$deviceInfo.navigator.visible
}
if (app._id === active) dispatch('toggleNav')
}}
/>
</NavLink>

View File

@ -160,11 +160,26 @@
const linkProviders = client.getModel().findAllSync(view.mixin.LinkIdProvider, {})
$deviceInfo.navigator.visible = getMetadata(workbench.metadata.NavigationExpandedDefault) ?? true
$deviceInfo.aside.visible = getMetadata(workbench.metadata.NavigationExpandedDefault) ?? true
const defaultNavigator = !(getMetadata(workbench.metadata.NavigationExpandedDefault) ?? true)
const savedNavigator = localStorage.getItem('hiddenNavigator')
const savedAside = localStorage.getItem('hiddenAside')
let hiddenNavigator: boolean = savedNavigator !== null ? savedNavigator === 'true' : defaultNavigator
let hiddenAside: boolean = savedAside !== null ? savedAside === 'true' : defaultNavigator
$deviceInfo.navigator.visible = !hiddenNavigator
$deviceInfo.aside.visible = !hiddenAside
sidebarStore.subscribe((sidebar) => {
if (!$deviceInfo.aside.float) {
hiddenAside = sidebar.variant === SidebarVariant.MINI
localStorage.setItem('hiddenAside', `${hiddenAside}`)
}
})
async function toggleNav (): Promise<void> {
$deviceInfo.navigator.visible = !$deviceInfo.navigator.visible
if (!$deviceInfo.navigator.float) {
hiddenNavigator = !$deviceInfo.navigator.visible
localStorage.setItem('hiddenNavigator', `${hiddenNavigator}`)
}
closeTooltip()
if (currentApplication && navigatorModel) {
await tick()
@ -638,14 +653,12 @@
$deviceInfo.navigator.float = workbenchWidth <= HIDE_NAVIGATOR
const checkWorkbenchWidth = (): void => {
if (workbenchWidth <= HIDE_NAVIGATOR && !$deviceInfo.navigator.float && $deviceInfo.navigator.visible) {
if (workbenchWidth <= HIDE_NAVIGATOR && !$deviceInfo.navigator.float) {
$deviceInfo.navigator.visible = false
$deviceInfo.navigator.float = true
} else if (workbenchWidth > HIDE_NAVIGATOR && $deviceInfo.navigator.float) {
if (getMetadata(workbench.metadata.NavigationExpandedDefault) === undefined) {
$deviceInfo.navigator.float = false
$deviceInfo.navigator.visible = true
}
$deviceInfo.navigator.float = false
$deviceInfo.navigator.visible = !hiddenNavigator
}
}
checkWorkbenchWidth()
@ -653,10 +666,8 @@
$deviceInfo.aside.visible = false
$deviceInfo.aside.float = true
} else if ($deviceInfo.docWidth > HIDE_ASIDE && $deviceInfo.aside.float) {
if (getMetadata(workbench.metadata.NavigationExpandedDefault) === undefined) {
$deviceInfo.aside.float = false
$deviceInfo.aside.visible = true
}
$deviceInfo.aside.float = false
$deviceInfo.aside.visible = !hiddenAside
}
const checkOnHide = (): void => {
if ($deviceInfo.navigator.visible && $deviceInfo.navigator.float) $deviceInfo.navigator.visible = false
@ -847,7 +858,12 @@
notify={hasInboxNotifications}
/>
</NavLink>
<Applications {apps} active={currentApplication?._id} direction={$deviceInfo.navigator.direction} />
<Applications
{apps}
active={currentApplication?._id}
direction={$deviceInfo.navigator.direction}
on:toggleNav={toggleNav}
/>
</div>
<div
class="info-box {$deviceInfo.navigator.direction}"

View File

@ -11,7 +11,7 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
RUN apt-get update && \
apt-get install -y gnupg wget dumb-init && \
apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 && \
apt-get install -y chromium --no-install-recommends && \
apt-get install -y chromium-common/stable chromium/stable --no-install-recommends && \
apt-get clean
WORKDIR /usr/src/app

View File

@ -5,8 +5,8 @@
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"cross-env": "~7.0.3",
"webpack-cli": "^5.0.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.1.4",
"webpack": "^5.97.1",
"mini-css-extract-plugin": "^2.2.0",
"dotenv-webpack": "^8.0.1",
"ts-loader": "^9.2.5",
@ -17,7 +17,7 @@
"file-loader": "^6.2.0",
"sass-loader": "^13.2.0",
"@types/node": "~20.11.16",
"webpack-bundle-analyzer": "^4.7.0",
"webpack-bundle-analyzer": "^4.10.2",
"svgo-loader": "^3.0.0",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.20",

View File

@ -12,7 +12,6 @@ import {
} from './tracker.utils'
import { Issue, NewIssue } from '../model/tracker/types'
import { IssuesDetailsPage } from '../model/tracker/issues-details-page'
import { CommonTrackerPage } from '../model/tracker/common-tracker-page'
test.use({
storageState: PlatformSetting
@ -20,17 +19,14 @@ test.use({
test.describe('Tracker sub-issues tests', () => {
let issuesPage: IssuesPage
let issuesDetailsPage: IssuesDetailsPage
let commonTrackerPage: CommonTrackerPage
test.beforeEach(async ({ page }) => {
issuesPage = new IssuesPage(page)
issuesDetailsPage = new IssuesDetailsPage(page)
commonTrackerPage = new CommonTrackerPage(page)
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
})
test('create sub-issue', async ({ page }) => {
await commonTrackerPage.clickOnApplicationButton()
const props = {
name: `issue-${generateId(5)}`,
description: 'description',