- type events that are handed between components
- simplify the `resolve` function interface
- before we had return values and exceptions, now just a single union
type as return value
- move navigation to the Search component to reduce its
responsibilities
- flatten and simplify multi-level branching
- shuffle around code
- move the `resolve` function to the `Search` component module,
because it's only used there
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
Refactor and inline the MobileNavbar component into Header. This fixes a
bug where it wasn't possible to close the context menu once it was open.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
- Move all global typography styles to its own file. This makes it
easier to find all the typography related definitions for newcomers.
- Prefix all typography related global CSS classes with a unique prefix
`.txt-`. This allows us to grep the codebase and see exactly where
they are applied. Another benefit of this convention is that it helps
to avoid accidentally mixing global and local styles. Having global
CSS classes that sometimes overlap with component CSS classes makes it
very hard to reason about the resulting visuals and making changes
unpredictable.
- Introduce CSS variables for standardised typography sizes and apply
them to the whole codebase consistently. This way we can adjust the
size in one place and it will be applied everywhere.
- Avoid using predefined HTML tags which might have differing styling
from browser to browser, e.g. `<h1>`, `<strong>`. We should stick to
applying styling either by adding a specific global CSS class or using
the predefined CSS variables, this way we can be sure that the styles
won't be overridden by browser defaults.
- Have a minimal set of modifiers `.txt-monospace` and `.txt-bold` and
apply them consistently. Since `.txt-monospace` is defined via a CSS
variable, we'll be able to switch out fonts via a user setting in the
future.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
We wont have always an address available to be passed as title for the Avatar
component, e.g. when working with URNs.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This PR moves the signer "clones" the signer property from the `Config`
object into the `session` state, to allow Svelte reactivity, e.g. in the
Testnet Faucet, where we rely on `config.signer` but since it only
changes when the `Config` object in `App.svelte` changes we can't react
on it.
For now I only cloned the signer property, if we see in the future that
there are other properties that need to change with session we can add
them.
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
- Removes the base property from vite.config, until a better solution
has been found, wasn't able to reproduce it locally in production
build though.
- Moves desktop and mobile classes from components to index.css
- Used a own CSS hide mechanism for the ellipsis menu.
- Shortens the addresses in org and users view, and wraps orgs in user
view
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Introduce two types of profile: a 'full' and a 'minimal'.
The minimal is used when only the avatar is required, which
is in most places. Requests for an org view is reduced by 3x.
Signed-off-by: Alexis Sellier <self@cloudhead.io>