The current approach wasn't working. Not sure what caused it to stop working,
but anyway that was an hacky import, as evidenced by the ungainly warning
webpack would print on `yarn dev`. So instead of taking the path, we just take
the JSON contents directly, sidestepping all that.
**Tested by**
Rerunning the upload tests
This was found useful by @Bramas when building a Dockerfile of the web app
itself. See https://github.com/ente-io/ente/pull/1065.
Now, the GIT_SHA environment variable can just be undefined if we're not in a
git repository, and the code using it deals with that case explicitly.
**Tested by**
Temporarily inverted the isDevBuild flag, tehn
1. Ran the build normally and verified that the SHA continued to appear in the logs.
2. Ran the build after copying to a standalone folder without an associated git
repository and verified that the SHA was skipped without causing the build to
fail.
Sentry has a measurable impact on page load, a metric that I'm keen to
improve. Apparently by default it loses us 8-9 page speed points, though that
can be reduced to 3-4
(https://github.com/getsentry/sentry-javascript/issues/9179).
All of this is doable, but there are bigger tasks to deal with. This is not to
say that Sentry won't be useful again at some point, when we have time to deal
with it better. But right now, we discussed that it's just better to remove
Sentry instead of piling on to the sunk cost.
This flow probably got broken when the select-all-for-a-day functionality got
added in https://github.com/ente-io/ente/pull/674 (haven't dug into this, I'm
just guessing since that's where this all got touched).
Thank you to @Bramas on our Discord for pointing this out, and also providing the fix:
https://github.com/ente-io/ente/compare/main...Bramas:ente:fix-error-on-shared-album
Tested by
---------
Run normal web app on one terminal
NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3002 yarn dev
Run the albums listener on another port (need to do this since we're running on
localhost, and need to bind to a different origin):
NEXT_PUBLIC_ENTE_ENDPOINT=http://localhost:8080 NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=http://localhost:3002 yarn dev:albums
Create a shared album, copy its public link, and verify that
- Before the fix we were getting an error (trying to access properties of `galleryContext.selectedFile`)
- After the fix the shared album is visible
Not integrating GitHub deployments for now since creating a deployment
(anywhere) causes "This branch has not been deployed" message to appear on
unrelated branches.
Also, the Discord /github webhook doesn't support deployment status events
anyway - Discord accepts and responds to the webhook with a 204 but it doesn't
appear in the channel. This is not a big issue, we can easily massage the
payload ourselves, but just mentioning this for posterity. Refs:
* [Corresponding issue on Discord](https://github.com/discord/discord-api-docs/issues/6203#issuecomment-1608151265)
* [A general recipe](https://gist.github.com/jagrosh/5b1761213e33fc5b54ec7f6379034a22)
---
For deleting the existing deployment I had to
```
gh api /repos/ente-io/ente/deployments --jq=".[].id"
gh api --method DELETE -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "/repos/ente-io/ente/deployments/1375794893"
```
This helpful hint taken from https://github.com/orgs/community/discussions/46375. Thanks!
This select-all checkbox was added in https://github.com/ente-io/ente/pull/674.
These are some changes to how it looks:
- Move the checkbox to the left
- Reduce the size of the checkbox
## Description
fixes https://github.com/ente-io/ente/issues/535
This PR will add checkbox to all select files on a day, this will also
handle manual selection of files and select all checkbox on a day.