This commit adds a flash toggle for the camera in the "Sign in" and "Scan sync code" screens.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Rewrite the shadows foundation API:
- Fix (implementation & usages): theme changes were not causing shadows to be
reevaluated.
- Optimization: define all possible shadow values at compile time. Good to
reduce cycles on garbage collection since recreating the shadow map all the
time is unnecessary and also to save cycles on computing colors since calls to
colors/alpha are not memoized.
- API redesign: unify access to Design System shadows in a single function.
None of the actual shadow values changed.
Fixes https://github.com/status-im/status-mobile/issues/16526
API rationale
=============
The quo2.foundations.shadows namespace reflects what's in the Design System >
Foundations > Shadows https://www.figma.com/file/v98g9ZiaSHYUdKWrbFg9eM/Foundations?type=design&node-id=624-965&mode=design&t=CvIotdjbHKHcHjpd-0).
Figma users see these shadows in other components as "Shadow/Normal/Light/03".
Notice the shadow's weight is shown as a number (not the semantic name in Figma,
e.g. "intense", "strong"):
So to make things as easy as possible, I opted for exposing a single public
function named "get", which receives arguments in order of frequency of usage
and which expects shadow weights as numbers so that devs don't need to mentally
translate 1 to "soft", or 3 to "intense".
Re-implements the component Community List according to guidelines
and, most importantly, fixes a bunch of issues and tries to achieve 100%
compatibility with Figma.
The new implementation is trying to mirror Figma properties as much as possible.
Fixes https://github.com/status-im/status-mobile/issues/16447
Changelog:
- Refactor to guidelines.
- Fix: original implementation in money/format-amounts had a bug caught by new
unit tests ("1000000" was formatted incorrectly).
- Fix: Community permission tag correct background when theme is overridden and
when blur is enabled.
- Fix: Notification dot uses correct colors for dark mode and blur variants.
- Fix: Community stats background when blur is enabled.
- Fix: Community stats icon color when blur is enabled.
- Add: The component's Quo preview screen is smarter and will only show form
fields (aka descriptors) that are relevant for each component type (engage,
discover or share).
- Add: replace hardcoded community statistics with an implementation that
actually accepts real numbers and which are correctly formatted.
- Add: New Quo descriptor type number.
- Add: Component uses correct shadows according to foundations/shadows.
This commit fixes the log-in validation issue due to not receiving the "node.login" signal from "status-go".
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit fixes the seen state of notifications, if the user is in the Activity Center screen while receiving a new notification.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit fixes the profile colour in the following screens:
- "View Profile" button on the "Add a contact" page
- "Jump to" button inside the chat
- "Jump to" button in the "Community Overview" screen
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
- Community channels may not have an emoji, and in such cases, it should fall
back to a single letter. The component was recently updated in Figma after
this concern was brought up to designers.
- The default (fallback) color to be used in the list of community channels
should be the community color, not a default "primary-50" as was before. It's
a subtle change because the colors are rendered at 10% transparency.
- Rewrote the channel-avatar component to follow guidelines.
Fixes:
- https://github.com/status-im/status-mobile/issues/16332
- https://github.com/status-im/status-mobile/issues/16327
This commit gets rid of the app-state check which is buggy,
The app-state becomes `active` after the universal link code has executed always resulting in the redirect not happening.
This commit does the following:
- Moves `get-abbreviated-profile-url` from shell share view into `utils.address` and update its usage.
- Adds `get-shortened-compressed-key` to `utils.address` and update the code using `get-shortened-key` to now use `get-shortened-compressed-key` instead.
- Adds test for newly introduced utils.
It's well known that shadowing core Clojure vars can lead to unexpected bugs. In
fact, it's a common source of bugs in other languages too. In the status-mobile
repository there are, in total, 562 shadowed vars, ~500 are core vars. Excluding
the "old code" we still have 285 offenders.
In status-mobile I've already seen two bugs caused by shadowed vars, both with
the shadowed var "name". But probably other problems happened in the past, and
others will happen in the future if we don't do something about this. This PR is
also my response to my frustration trying to review PRs and checking for
shadowed vars, humans were not meant for that!
In this commit we are enabling ":shadowed-var" to lint certain (not all) core
vars as errors (not warnings). In future PRs we can gradually unshadow more
vars. For the record, name is shadowed 40 times in the new code and 130 in
total, and type is shadowed 93 times in the new code and 124 in total!
What about non-core vars, should we allow shadowing? There are ~70 non-core
shadowed vars. In my opinion, we should also lint and disallow shadowing
non-core vars, since it may cause the same kind of bugs of shadowing core vars.
But this decision can be left for another moment/issue, after we have fixed the
most prominent problem of shadowing core vars.
Which vars are unshadowed in this PR? I fixed 62 errors and unshadowed
cljs.core/iter, cljs.core/time, cljs.core/count, cljs.core/key,
clojure.core/key.
Resources:
- [clj-kondo linter: shadowed-var](https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#shadowed-var)
* Refactor: Remove use of f-component
* Fix documentation drawer styles
* Refactor: move title styles to style ns
* Fix StaticSafeAreaInsets not being defined on component tests
* Fix bottom sheet height on Android
* Makes `divider-label` styles more lenient
* Small refactor to `list-items.channel` component
* Fix styles for `channel-list-component`
- Refactor `channel-list-component`
- Add some missing `:style` keys in `status-im2.contexts.communities.overview.view`
- Fix a warning related to using a `deref` in a `lazy-seq`
* Changes icon keyword namespace from `:main-icons` to `:i`