From 511c324bad68e6589bf38238712faf4ce3f85b72 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 7 Mar 2025 19:50:06 +0530 Subject: [PATCH 1/3] [web] Submodules required no more --- .github/workflows/web-deploy-one.yml | 2 -- .github/workflows/web-deploy-preview.yml | 2 -- .github/workflows/web-deploy-staging.yml | 1 - .github/workflows/web-deploy.yml | 2 -- desktop/.github/workflows/desktop-release.yml | 1 - docs/docs/self-hosting/guides/web-app.md | 13 ++++++------- docs/docs/self-hosting/index.md | 1 - web/README.md | 6 ------ web/apps/photos/eslint.config.mjs | 2 +- web/apps/photos/tsconfig.json | 2 +- 10 files changed, 8 insertions(+), 24 deletions(-) diff --git a/.github/workflows/web-deploy-one.yml b/.github/workflows/web-deploy-one.yml index 77c338513d..28b9b8d1d1 100644 --- a/.github/workflows/web-deploy-one.yml +++ b/.github/workflows/web-deploy-one.yml @@ -26,8 +26,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - submodules: recursive - name: Setup node and enable yarn caching uses: actions/setup-node@v4 diff --git a/.github/workflows/web-deploy-preview.yml b/.github/workflows/web-deploy-preview.yml index 4bb1870726..fe60ccd36e 100644 --- a/.github/workflows/web-deploy-preview.yml +++ b/.github/workflows/web-deploy-preview.yml @@ -26,8 +26,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - submodules: recursive - name: Setup node and enable yarn caching uses: actions/setup-node@v4 diff --git a/.github/workflows/web-deploy-staging.yml b/.github/workflows/web-deploy-staging.yml index 4323ee34c4..4ea739324b 100644 --- a/.github/workflows/web-deploy-staging.yml +++ b/.github/workflows/web-deploy-staging.yml @@ -34,7 +34,6 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ steps.select-branch.outputs.branch }} - submodules: recursive - name: Setup node and enable yarn caching uses: actions/setup-node@v4 diff --git a/.github/workflows/web-deploy.yml b/.github/workflows/web-deploy.yml index 3cdb03dea8..2064c13163 100644 --- a/.github/workflows/web-deploy.yml +++ b/.github/workflows/web-deploy.yml @@ -30,8 +30,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - submodules: recursive - name: Setup node and enable yarn caching uses: actions/setup-node@v4 diff --git a/desktop/.github/workflows/desktop-release.yml b/desktop/.github/workflows/desktop-release.yml index 2612820878..71d8384660 100644 --- a/desktop/.github/workflows/desktop-release.yml +++ b/desktop/.github/workflows/desktop-release.yml @@ -45,7 +45,6 @@ jobs: "${{ startsWith(github.ref, 'refs/tags/v') && format('photosd-{0}', github.ref_name) || ( inputs.source || 'main' ) }}" - submodules: recursive - name: Setup node uses: actions/setup-node@v4 diff --git a/docs/docs/self-hosting/guides/web-app.md b/docs/docs/self-hosting/guides/web-app.md index 18bb95a7c7..fba0e3464e 100644 --- a/docs/docs/self-hosting/guides/web-app.md +++ b/docs/docs/self-hosting/guides/web-app.md @@ -12,13 +12,12 @@ The getting started instructions mention using `yarn dev` (which is an alias of >[!IMPORTANT] > Please note that Ente's Web App supports the Yarn version 1.22.xx or 1.22.22 specifically. -> Make sure to install the right version or modify your yarn installation to meet the requirements. +> Make sure to install the right version or modify your yarn installation to meet the requirements. > The user might end up into unknown version and dependency related errors if yarn > is on different version. ```sh cd ente/web -git submodule update --init --recursive yarn install NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 yarn dev:photos ``` @@ -163,7 +162,7 @@ npm install pm2@latest Copy the below contents to a file called `ecosystem.config.js` inside the `ente/web` directory. -```js +```js module.exports = { apps: [ { @@ -212,16 +211,16 @@ pm2 start pm2 logs all ``` -## Configure App Endpoints +## Configure App Endpoints -> [!NOTE] +> [!NOTE] > Previously, this was dependent on the env variables `NEXT_ENTE_PUBLIC_ACCOUNTS_ENDPOINT` > and etc. Please check the below documentation to update your setup configurations You can configure the web endpoints for the other apps including Accounts, Albums -Family and Cast in your `museum.yaml` configuration file. Checkout +Family and Cast in your `museum.yaml` configuration file. Checkout [`local.yaml`](https://github.com/ente-io/ente/blob/543411254b2bb55bd00a0e515dcafa12d12d3b35/server/configurations/local.yaml#L76-L89) -to configure the endpoints. Make sure to setup up your DNS Records accordingly to the +to configure the endpoints. Make sure to setup up your DNS Records accordingly to the similar URL's you set up in `museum.yaml`. Next part is to configure the web server. diff --git a/docs/docs/self-hosting/index.md b/docs/docs/self-hosting/index.md index 6631182da5..c192829ae3 100644 --- a/docs/docs/self-hosting/index.md +++ b/docs/docs/self-hosting/index.md @@ -49,7 +49,6 @@ Then in a separate terminal, you can run (e.g) the web client ```sh cd ente/web -git submodule update --init --recursive yarn install NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 yarn dev ``` diff --git a/web/README.md b/web/README.md index 794de5298e..f855db810d 100644 --- a/web/README.md +++ b/web/README.md @@ -12,12 +12,6 @@ To know more about Ente, see [our main README](../README.md) or visit ## Building from source -Fetch submodules - -```sh -git submodule update --init --recursive -``` - Install dependencies ```sh diff --git a/web/apps/photos/eslint.config.mjs b/web/apps/photos/eslint.config.mjs index 7dd03efc45..e12e813c69 100644 --- a/web/apps/photos/eslint.config.mjs +++ b/web/apps/photos/eslint.config.mjs @@ -2,7 +2,7 @@ import config from "@/build-config/eslintrc-next-app.mjs"; export default [ ...config, - { ignores: ["thirdparty", ".next-desktop"] }, + { ignores: [".next-desktop"] }, { rules: { /* TODO: diff --git a/web/apps/photos/tsconfig.json b/web/apps/photos/tsconfig.json index b56ff75f1b..4901a28d52 100644 --- a/web/apps/photos/tsconfig.json +++ b/web/apps/photos/tsconfig.json @@ -22,5 +22,5 @@ "../../packages/base/components/utils/mui-theme.d.ts", "../../packages/base/global-electron.d.ts" ], - "exclude": ["node_modules", "out", ".next", "thirdparty"] + "exclude": ["node_modules", "out", ".next", ".next-desktop"] } From 0ee496401a5053ef178ba28a9aed89edc2c6e751 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 7 Mar 2025 19:52:23 +0530 Subject: [PATCH 2/3] Mention ps --- web/docs/dependencies.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/docs/dependencies.md b/web/docs/dependencies.md index 660148b1b8..4ae5094eba 100644 --- a/web/docs/dependencies.md +++ b/web/docs/dependencies.md @@ -219,6 +219,9 @@ via [@fontsource-variable/inter](https://fontsource.org/fonts/inter/install). ## Photos app specific +- [PhotoSwipe](https://photoswipe.com) provides the base image viewer on top of + which we've built our file viewer. + - [react-dropzone](https://github.com/react-dropzone/react-dropzone/) is a React hook to create a drag-and-drop input zone. Note that we pin to the last version in the 14.2 series, since if we use 14.3 onwards (I tested till From 3900ee609faf60edeca84ba1c5303631704cd2c7 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 7 Mar 2025 20:18:52 +0530 Subject: [PATCH 3/3] Fix clicks on hidden buttons --- web/apps/photos/src/styles/photoswipe.css | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/web/apps/photos/src/styles/photoswipe.css b/web/apps/photos/src/styles/photoswipe.css index 33f2710d29..984f861351 100644 --- a/web/apps/photos/src/styles/photoswipe.css +++ b/web/apps/photos/src/styles/photoswipe.css @@ -11,6 +11,23 @@ top: calc(env(titlebar-area-height, 0px) * 0.4); } +/* The PhotoSwipe CSS already disables and re-enables pointer-events for hidden + UI elements, but for a reason that I didn't investigate more, that isn't + working, and the hidden buttons still remain clickable. + + As a workaround, repeat the CSS, but with a higher specificity by including + the button selector */ + +.pswp .pswp__hide-on-close button { + pointer-events: none; +} + +.pswp--ui-visible .pswp__hide-on-close button { + pointer-events: auto; +} + +/* Tweak the visual look of the preloader to match the rest of the elements */ + .pswp-ente .pswp__preloader--active .pswp__icn { opacity: 0.4; }