summaryrefslogtreecommitdiff
path: root/ui/styles
Commit message (Collapse)AuthorAge
* Remove remnant `html` class from swatch textinputs.Owen Jacobson2025-07-18
| | | | This was a leftover from the idea that different swatches might have different input notations - and they do, but we turned out not to need to style them differently. And, in any event, this class was applied (only) to inputs that _aren't HTML_, because of 01ed82ac4f89810161fbc3aa1cb8e4691fb8938b.
* Create swatches for Svelte components.ojacobson2025-07-10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A swatch is a live, and ideally editable, example of an element of the service. They serve as: * Documentation: what is this element, how do you use it, what does it do? * Demonstration: what does this element look like? * Manual test scaffolding: when I change this element like _so_, what happens? Swatches are collectively available under `/.swatch/` on a running instance. They do not require setup or login for simplicity's sake and because they don't _do_ anything that requires either of those things. Swatches are manually curated. First, we lack the technical infrastructure needed to do this based on static analysis, and second, manual curation lets us include affordances like "interesting values," that would be tricky to express as part of the type or schema for the component. The tradeoff, however, is that they will fall out of step with the components if not reviewed regularly. Swatches are _possible_ because we've gone to efforts to avoid global data access or direct side effects (including API requests) in our components, delegating that upwards to `+page`s and `+layout`s. However, the isolation is imperfect. For example, the swatch for `Conversation`, which renders the conversation sidebar entries, causes actual attempts to boot the app as browsers pre-fetch the links on mouseover, and clicking them will take the user to the "real" application because they really are links. Merges swatch into main.
| * Set up a skeleton for swatches.Owen Jacobson2025-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A swatch is a live, and ideally editable, example of an element of the service. They serve as: * Documentation: what is this element, how do you use it, what does it do? * Demonstration: what does this element look like? * Manual test scaffolding: when I change this element like _so_, what happens? Swatches are collectively available under `/.swatch/` on a running instance, and are set up in a separate [group] from the rest of the UI. They do not require setup or login for simplicity's sake and because they don't _do_ anything that requires either of those things. [group]: https://svelte.dev/docs/kit/advanced-routing#Advanced-layouts-(group) Swatches are manually curated, for a couple of reasons: * We lack the technical infrastructure needed to do this based on static analysis; and * Manual curation lets us include affordances like "recommended values," that would be tricky to express as part of the type or schema for the component. The tradeoff, however, is that swatches may fall out of step with the components they depic, if not reviewed regularly. I hope that, by making them part of the development process, this risk will be mitigated through regular use.
* | A few semantically-thin wrapper divs.Owen Jacobson2025-07-08
|/ | | | This is an extension of the previous commit: we don't need these divs _at all_ to achieve the layout we want, and we aren't attaching behaviour or semantics to them, so, out they go.
* Rename "channel" to "conversation" throughout the client.Owen Jacobson2025-07-03
| | | | Existing client state, stored in local storage, is migrated to new keys (that mention "conversation" instead of "channel" where appropriate) the first time the client loads.
* Use browser-native methods to hide elements, not CSS alone.Owen Jacobson2025-05-22
| | | | The hidden `textarea` used to attach the form value to the DOM was being included in the ARIA accessibility tree, at least in testing (I didn't check in a browser). While we could suppress this iwth `aria-role="hidden"`, the WHATWG recommendation is to Not Do That, and to find another way to hide the element, instead. Marking the element as hidden accomplishes that goal, _and_ gets rid of a style rule.
* Merge remote-tracking branch 'codeberg/prop/text-input-no-quill'Owen Jacobson2025-05-16
|\ | | | | | | | | | | > We can hand-write markdown for now, as per discussions. > > If we have buttons and shortcuts, we'd like them to insert actual markdown into the text stream, and then, as a separate concern, we'd like to render the markdown without changing the text stream (à la Discord). But we're doing none of that now, and it's too high a piece of fruit to pluck today.
| * Move placeholder-related CSS into `textarea.css`.Owen Jacobson2025-05-15
| |
| * Restore the placeholder when the editable input is emptied out after ↵Owen Jacobson2025-05-13
| | | | | | | | | | | | modification. This also avoids using `placeholder` on elements where it's nonstandard, like `<div>`s.
| * Make the resulting form more amenable to normal DOM operations.Owen Jacobson2025-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is purely an aesthetic choice: * The DOM `reset()` function can be used to clear the form, but can't be used to clear editable DIVs. Binding the editable div to a (hidden) form field allows `reset()` to clear both. * We can find the target `form` element out of the event, but the API needed to do so differs between events dispatched to form controls and events dispatched to random DOM nodes. Using `closest('form')` works for both kinds of event target. In practice, there is little need to make sure the message input form uses "normal" DOM APIs for functional reasons. Everything inside `MessageInput` is controllable through the component's script. This change isn't based on a functional need, but rather in the hopes that integrating with the DOM APIs makes it easier for _code we don't control_ - screen readers, password managers, saved-form support in browsers, &c - to integrate with Pilcrow. It is purely speculative. (This also used to be necessary because Firefox didn't support `contenteditable="plaintext-only"`, but [support was added in March][ff-pto] [ff-pto]: https://www.mozilla.org/en-US/firefox/136.0/releasenotes/#:~:text=The%20value%20plaintext%2Donly%20can%20now%20be%20specified%20for%20the%20contenteditable%20attribute%2C%20making%20the%20raw%20text%20of%20an%20element%20editable%20but%20without%20supporting%20rich%20text%20formatting.
| * Implement the disabled state:Owen Jacobson2025-05-13
| | | | | | | | | | * Suppress input (including paste) while the input is disabled. * Style the input to make it visible that it's not accepting input.
| * Dim out placeholder text.Owen Jacobson2025-05-13
| | | | | | | | | | | | It's not much, but it makes it a bit easier to see that the placeholder text _is_ a placeholder. Not sure what to do about it vanishing permanently once the element is edited, until the element is formally `reset()`, though.
| * Fix up input to be a contenteditable divKit La Touche2025-05-11
| |
* | Remove code block borders.Owen Jacobson2025-05-08
| | | | | | | | This styling suggestion c/o Jessamyn Smith! Thanks, Jess. I like it.
* | Make rules targeting inline code more specific.Owen Jacobson2025-05-08
| | | | | | | | This prevents the need to go and un-apply unwanted styles when considering code blocks.
* | Prevent double-indenting of the first line of a code block.Owen Jacobson2025-05-08
| | | | | | | | | | | | | | | | | | | | | | | | For reasons known only to the author, marked emits code blocks as <pre><code>your code here</code></pre> Inline code, on the other hand, is emitted as <p>Non-code text <code>code text</code> non-code text.</p> In d15bfb2b9a4872cba99bc966fe5c9c4399b3323c, we added a rule to give inline code nicer leading and trailing space, so that the borders don't directly abut the letters. However, we neglected to consider code blocks; the padding added for inline code also affected their first line, pushing it in slightly. This removes the padding from `<code>` when it is a direct child of a `<pre>`, as per the markup emitted by marked.
* | Stlye headings, as well.Owen Jacobson2025-05-08
| | | | | | | | | | | | This is a fairly simple approach using a linearly-reducing scale (from 2.25 down to 1.0) to adjust both the font size and the line height. All headings are bold, and are in the body typeface. People who actually use headings in _chat messages_ are doing a bit, but hey, bits are valid.
* | Fix horizontal padding on inline codeKit La Touche2025-05-08
| |
* | Apply rounded borders to inline code inside list elements.Owen Jacobson2025-05-08
| | | | | | | | There isn't a good way to target "any <code> not inside a <pre>" so we do a little reverse logic here, as a treat.
* | Provide conventional text styling for message bodies.Owen Jacobson2025-05-08
|/ | | | | | | | | | | | | | | | | | Our reset strips out a ton of default browser styles, which is good, but we haven't yet gotten around to adding styles we're using. This left formatted messages feeling a lot like this regardless of the intended formatting. (Is the above an example of a paragraph? A list? A single line that has gotten wrapped? The answer was "yes.") To make the margins and padding work out nicely, I've rearranged the positioning containers used for message runs and messages. We also no longer `float` the message handles, since we no longer need to: they can be positioned relative to the message they're part of. Styling on long bodies of inline code (`like this`) is a bit shaky. The outline overlaps with the following line. I think having a visual cue for where the code block begins and ends is _good_, but I'd like to pick apart some of the other examples on the internet because I think this needs more work. This change also makes code blocks wrap lines at the page edge where possible (it'll still scroll if wrapping isn't possible). This won't affect _most_ code blocks much - code tends to not be that wide - and it means that using a code block for effect doesn't require people to manually wrap strings. Having tried it both ways, this feels more human. Dumbnailing is not a _great_ solution to dealing with huge images, but it's the best we can do at rendering time. A more complete solution would require generating images at multiple sizes.
* Merge branch 'prop/outbox-message-ui'Owen Jacobson2025-05-08
|\
| * Render messages as ghosts when there's a pending delete, too.Owen Jacobson2025-05-06
| |
| * Render "ghost" messages for unsent messages.Owen Jacobson2025-05-06
| | | | | | | | | | | | | | | | | | | | | | There is a subtle race conditon in this code, which is likely not fixable without a protocol change: * Ghost messages can disappear before their "real" message replacement shows up, if the client finishes sending (i.e., receives an HTTP response on the POST) before the server delivers the real message. * Ghost messages can be duplicated briefly, if the client receives the real message before the client finishes sending. Both happen in practice; we make no ordering guarantees between requests. To aviod this, we'd to give clients a way to correlate pending sends with received messages. This would require fundamentally the same capabilities, like per-operation nonces, that preventing duplicate operations will require.
| * Use a more targetted selector to control link text colours inside of messages.Owen Jacobson2025-05-06
| | | | | | | | Using a wildcard selector here makes this rule surprisingly hard to override, which will be a problem for styling unsent messages.
* | Split up link colours and use fewer wildcard patterns to re-style them.Owen Jacobson2025-05-06
|/ | | | | | This was causing problems with message colouring, as these rules had specificity similar to constructs like `.message.deleted`. This approach removes their browser default styles, then adds styling specific to the channel sidebar, the app bar, and the message view.
* Force the text colour for links in the channel list to something with decent ↵Owen Jacobson2025-04-21
| | | | | | | | contrast. We were ending up with colours picked by a more specific rule (`a, a:hover, a:visited, a:active`, from `app.css`), which was suppressing the colours we wanted. This is not a particularly elegant solution, but it is _an_ solution. Code organized this way to avoid giving `a` elements a background colour.
* Be a bit more careful with the nesting of anchors and list items.Owen Jacobson2025-02-21
| | | | Browsers cope with weird nestings mostly fine, but there's no upside for us in testing that.
* Remove duplicate `content` hack from reset.Owen Jacobson2025-02-21
| | | | | | According to <https://stackoverflow.com/a/6803278>, this was needed for old versions of Safari. However, since at least 2022, Safari has supported `content: none` just fine. Related Safari bug (still open as of this writing, comments relevnat): <https://bugs.webkit.org/show_bug.cgi?id=20032>
* Provide fallback generic fonts for our custom fontsOwen Jacobson2025-02-21
|
* Remove nonexistent CSS variableOwen Jacobson2025-02-21
|
* Remove references to nonexistent italic variants of FiraCodeOwen Jacobson2025-02-21
|
* npm formatOwen Jacobson2025-02-15
|
* Change default body font to RobotoKit La Touche2025-02-08
| | | | Let's try this.
* Style form placeholders and buttonsKit La Touche2025-01-19
|
* Fix bold and italic font considerationsKit La Touche2025-01-19
|
* Make small tweaks for mobile devicesKit La Touche2025-01-19
|
* Make mobile UI look a little betterKit La Touche2025-01-17
| | | | The rounded corners on an iPhone shouldn't be cut off now.
* Make handle text light, so it's legibleKit La Touche2025-01-14
|
* Merge branch 'main' into wip/fontsKit La Touche2025-01-13
|\
| * npm run formatOwen Jacobson2025-01-11
| |
| * Remove padding around the app-bar logo button, to stop safari from laying it ↵Owen Jacobson2025-01-11
| | | | | | | | out overlapping with the main area
| * Use margins, rather than alternating float/non-float elements, to lay out ↵Owen Jacobson2025-01-11
| | | | | | | | own/other messages.
| * Reinstate delete-armed message colouringOwen Jacobson2025-01-09
| |
| * Rectilinear sidebar, rather than rounded. The rounded corners were leaving ↵Owen Jacobson2025-01-09
| | | | | | | | some visually-displeasing shapes and gaps near the bottom of the app.
* | Add initial fontsKit La Touche2025-01-13
|/ | | | | We're not using Overlock currently, but I think it'll be good on headers and stuff?
* Take the edge off the text coloursKit La Touche2025-01-06
|
* Fix message handle positionKit La Touche2025-01-06
|
* Make all text in active channel same colourKit La Touche2025-01-05
|
* Fix up active and hover sidebar stylesKit La Touche2025-01-05
|
* Stylize channel badgesKit La Touche2025-01-05
|