Commit graph

25152 commits

Author SHA1 Message Date
Manav Rathi
14fe0a46b0
[web] Bundle translations but lazily (#1343)
## Description

Muchos faster, muchos caching, and no duplication.

**Tested by**

Running locally in both dev and preview. Only the current language +
English is fetched. It can be made even faster by prebundling the
English translations as described in
https://github.com/i18next/i18next-resources-to-backend, but we can
profile first and see if that's even needed.
2024-04-06 12:41:25 +05:30
Manav Rathi
568f4540e3
Remove scripts
It has done its job, let it rest in peace
2024-04-06 12:12:15 +05:30
Manav Rathi
6bff42ad9b
Remove unused keys 2024-04-06 12:11:29 +05:30
Manav Rathi
d00211964b
Improve heuristic 2024-04-06 11:45:05 +05:30
Manav Rathi
8695f46b43
Improve script for finding unused keys 2024-04-06 11:43:56 +05:30
Manav Rathi
8020d83ced
Fix crowdin paths 2024-04-06 11:30:31 +05:30
Manav Rathi
121df66ada
Cleanup 2024-04-06 11:19:14 +05:30
Manav Rathi
a98a29800b
[web] Bundle translations but load them lazily
Refs:
- https://github.com/i18next/i18next-resources-to-backend
- https://stackoverflow.com/questions/77251750/how-to-implement-lazy-loading-translations-in-i18next-with-react
- https://github.com/i18next/react-i18next/issues/525
- https://gist.github.com/SimeonC/6a738467c691eef7f21ebf96918cd95f
- https://www.i18next.com/overview/plugins-and-utils
2024-04-06 11:06:29 +05:30
Vishnu Mohandas
afe94b72ba
[meta] Call out custom icons as a good starter task (#1342) 2024-04-06 08:46:23 +05:30
Manav Rathi
167e5a95ca
[meta] Call out custom icons as a good starter task 2024-04-06 08:44:50 +05:30
Vishnu Mohandas
2bd02eac4b
[FIX] Smart auth revert, issue #1279 (#1340)
## Description

Revert Pinput version to fix smart_auth and hence the fdroid build.

Fixes #1279
2024-04-05 23:17:26 +05:30
Prateek Sunal
bfc147b4d1 fix: revert pinput version 2024-04-05 23:13:40 +05:30
Manav Rathi
16cb63edfe
[web] Run tsc when linting (#1339) 2024-04-05 22:10:07 +05:30
Manav Rathi
6333792d64
Temporarily disable tsc on CI 2024-04-05 22:03:39 +05:30
Manav Rathi
69bd822499
Attempt to fix tsc warning on CI
Error: src/services/wasm/ffmpeg.ts(6,38): error TS2307: Cannot find module 'ffmpeg-wasm' or its corresponding type declarations.
2024-04-05 21:59:18 +05:30
Manav Rathi
6a31331ac4
Fix lint issue when running on CI
> cast
    $ /home/runner/work/ente/ente/web/node_modules/.bin/tsc
    Error: src/components/FilledCircleCheck/index.tsx(2,20): error TS2307: Cannot find module './FilledCircleCheck.module.scss' or its corresponding type declarations.
2024-04-05 21:56:46 +05:30
Manav Rathi
e16834e52e
Remove unused styled jsx tag
This caused the lint to fail on CI

    > auth
    $ /home/runner/work/ente/ente/web/node_modules/.bin/tsc
    Error: src/pages/auth/index.tsx(125,20): error TS2322: Type '{ children: string; jsx: true; }' is not assignable to type 'ClassAttributes<HTMLStyleElement> & StyleHTMLAttributes<HTMLStyleElement> & { css?: Interpolation<Theme>; }'.
      Property 'jsx' does not exist on type 'ClassAttributes<HTMLStyleElement> & StyleHTMLAttributes<HTMLStyleElement> & { css?: Interpolation<Theme>; }'.
    error Command failed with exit code 2.

From reading the code, this CSS doesn't seem to be coming into effect. Then I
also did a test to verify that the auth app is correctly switching to a 2 column
layout even without this.
2024-04-05 21:39:52 +05:30
Manav Rathi
10b0d9f533
Fix the yarn lint 2024-04-05 21:22:44 +05:30
Manav Rathi
791cc61ca7
Fix more leftover issues 2024-04-05 21:18:26 +05:30
Manav Rathi
7a674dcf95
lint-fix 2024-04-05 21:10:59 +05:30
Manav Rathi
5c313fb87d
tsc when linting 2024-04-05 21:10:20 +05:30
Manav Rathi
411984ebdc
Fix lint errors 2024-04-05 21:09:47 +05:30
Manav Rathi
8764e5cf4d
[web] Miscellaneous code improvements (#1336) 2024-04-05 20:50:56 +05:30
Manav Rathi
cf27f3236c
lint-fix 2024-04-05 20:48:23 +05:30
Manav Rathi
42a59f2fb5
Consolidate and deduplicate 2024-04-05 20:35:22 +05:30
Manav Rathi
7807d3a413
Inline 2024-04-05 20:03:23 +05:30
Manav Rathi
461430a972
Move up from shared 2024-04-05 20:01:28 +05:30
Manav Rathi
0b39759ad9
Inline 2024-04-05 19:58:45 +05:30
Manav Rathi
fe6215d0fd
Replace context entry with useRouter 2024-04-05 19:58:45 +05:30
Manav Rathi
e680970cdf
Inline 2024-04-05 19:58:45 +05:30
Manav Rathi
63387d8819
Use regular image
This is the only place we were using next/image
2024-04-05 19:58:45 +05:30
Manav Rathi
356ad6f004
Use regular link
Removing unnecessary dependencies on next specific components
2024-04-05 19:58:45 +05:30
Manav Rathi
7be2c66fb6
[server] Delete the subscriber on listmonk when needed (#1331) 2024-04-05 17:14:09 +05:30
vishnukvmd
c32badc82c [server] Delete the subscriber on listmonk when needed 2024-04-05 17:12:06 +05:30
Manav Rathi
dbdad18c96
[web] Uncomment accidentally activated env vars for localhost defaults (#1330) 2024-04-05 17:09:24 +05:30
Manav Rathi
ae51531bd0
[web] Uncomment accidentally activated env vars for localhost defaults 2024-04-05 17:08:47 +05:30
Manav Rathi
4ad060c4e4
[infra] Fix the listmonk upgrade invocation (#1329)
Tested on the actual instance
2024-04-05 17:03:03 +05:30
Manav Rathi
5266e5d1dc
[infra] Fix the listmonk upgrade invocation 2024-04-05 16:51:08 +05:30
Vishnu Mohandas
5904e3dd2c
[server] Allow a configurable sslmode (#1327)
Tested that

- [x] Existing defaults remain unchanged
- [x] Setting db.sslmode = require in museum.yaml is honoured (in the
docker compose environment, that causes the db connection to fail as
expected)
2024-04-05 13:58:17 +05:30
Manav Rathi
74decc32de
[server] Allow a configurable sslmode
Tested

- Existing defaults remain unchanged
- Setting db.sslmode = require in museum.yaml is honoured (in the docker compose environment, that causes the db connection to fail as expected)
2024-04-05 11:52:22 +05:30
Vishnu Mohandas
5e8f41cbfe
[mob] Change share page copy (#1323)
## Description

I thought the "Collect photos" line and the download icon in the share
page looked very confusing:

![old_share_page_copy](https://github.com/ente-io/ente/assets/81471280/cb6a8415-e3a0-403e-abd3-e94b6256a572)

So I changed the icon and copy slightly:

![new_share_page_copy](https://github.com/ente-io/ente/assets/81471280/2480bb43-21fb-487a-af00-c473dbe7439c)


## Tests

Just a copy change, no tests.
2024-04-05 11:48:29 +05:30
Manav Rathi
360aa2903f
[web] Remove leftover console log (#1325) 2024-04-05 11:35:30 +05:30
Manav Rathi
0d48284b4f
[web] Remove leftover console log 2024-04-05 11:33:57 +05:30
Manav Rathi
687efe506a
[web] Fix an regression introduced in the previous PR (#1324)
Use the implementation instead of the accidental infinite loop
2024-04-05 11:32:32 +05:30
Manav Rathi
e0cfa36f08
Use the implementation instead of the accidental infinite loop 2024-04-05 10:51:04 +05:30
laurenspriem
858ba88c65 [mob] Change share page copy 2024-04-05 10:48:37 +05:30
Manav Rathi
e7e8ded1ed
[web] Miscellaneous improvements (#1322)
- Remove unused knobs
- Inline
- Initial-scale=1 is still recommended
- Remove custom _document (with a longer term vision of next => vite)
2024-04-05 10:17:04 +05:30
Manav Rathi
fa7cbaea18
Remove custom _document
Looking towards a longer term transition out of next
2024-04-05 10:09:37 +05:30
Manav Rathi
9785bbcb26
We don't have full web app support yet
Plus, Apple doesn't do much for PWAs anyway. One reason for removing this until
we test it out in actuality is because there were reports of the semi-PWA
caching causing issues.
2024-04-05 09:38:48 +05:30
Manav Rathi
039387a84e
Initial-scale=1 is still recommended
Ref:
https://teamtreehouse.com/community/is-initialscale-not-needed
2024-04-05 09:36:18 +05:30