Skip to content

Show non-member room state across list and room view - #666

Closed
tyreseluo wants to merge 3 commits into
project-robius:mainfrom
tyreseluo:fix/room-nonmember-view
Closed

Show non-member room state across list and room view#666
tyreseluo wants to merge 3 commits into
project-robius:mainfrom
tyreseluo:fix/room-nonmember-view

Conversation

@tyreseluo

@tyreseluo tyreseluo commented Jan 18, 2026

Copy link
Copy Markdown
Member

PR Content

  • keep left/banned rooms visible with status hint
  • switch input bar to membership footer and stop typing actions
  • update restore status view for persisted rooms

  1. if any administer ban somebody, the room screen will show:
image and you can't re-join again, but if administer unban, it will show: image and you can re-join again.
  1. if you has been removed, if this room join rule is can re-join again, seem about administer unban you solution above.

  2. if adminster changes room's join rule, seem room_input_bar will display differece view.

  • public (user can easy to re-join)
  • invite olny (adminster must re-send a invitation)
image

like this flow: user joined -> adminster remove user -> adminster send invitation again -> user can accpet or reject.
-> if user accept, the normal join room process.
-> if not(below):

If the user has previously visited this room, the room will remain accessible, but the user will be unable to send messages and can only view historical messages. If the user has never visited this room, they will enter the standard rejection process.

PR Related PR/Issue

- keep left/banned rooms visible with status hint
- switch input bar to membership footer and stop typing actions
- update restore status view for persisted rooms
@tyreseluo tyreseluo self-assigned this Jan 18, 2026
@tyreseluo tyreseluo added the waiting-on-author This issue is waiting on the original author for a response label Jan 18, 2026
@tyreseluo
tyreseluo marked this pull request as ready for review January 19, 2026 03:03
@tyreseluo

tyreseluo commented Jan 19, 2026

Copy link
Copy Markdown
Member Author

@kevinaboos Although this PR is ready for review, but i think we need to wait #640 RoomLoadingScreen widget, because this PR still use RestoreStatusView widget, so anytime if #640 was merged and we can use RoomLoadingScreen, i will modify this PR, move RestoreStatusView to RoomLoadingScreen widget.

@tyreseluo tyreseluo added waiting-on-review This issue is waiting to be reviewed waiting-on-author This issue is waiting on the original author for a response and removed waiting-on-author This issue is waiting on the original author for a response waiting-on-review This issue is waiting to be reviewed labels Jan 19, 2026
@tyreseluo tyreseluo added waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Jan 20, 2026
@tyreseluo
tyreseluo requested a review from kevinaboos January 20, 2026 03:49
@kevinaboos

kevinaboos commented Jan 21, 2026

Copy link
Copy Markdown
Member

@kevinaboos Although this PR is ready for review, but i think we need to wait #640 RoomLoadingScreen widget, because this PR still use RestoreStatusView widget, so anytime if #640 was merged and we can use RoomLoadingScreen, i will modify this PR, move RestoreStatusView to RoomLoadingScreen widget.

Yes, I agree. I left a detailed comment on #640. Once you read that, I think you'll agree that a single LoadingScreen widget could also be used for the purposes of this PR, i.e., to display a room that the user was previously a joined member of, but has since left or been kicked/banned.

I skimmed the code here on this PR and am not sure that I'm on board with your approach. You're making things way too complex by trying to re-use existing infrastructure for something that really ought to be handed separately. For example, you're using the joined rooms set in the RoomsList to store rooms that the user is no longer a member of, which is not only confusing but also violates the invariant of that type. It also won't work with the room list service, because that service needs to be able to remove rooms that the user has left. It'd be much clearer and better in the long run to just explicitly add support for left/kicked/banned rooms (and Knocked rooms, since that's the only other type) and to have the RoomsList track those separately.

I think it's best if we put this PR on hold until the LoadingScreen design is completed.

@kevinaboos kevinaboos added blocked Blocked on another issue or missing feature waiting-on-author This issue is waiting on the original author for a response and removed waiting-on-review This issue is waiting to be reviewed labels Jan 21, 2026
@kevinaboos
kevinaboos removed their request for review January 21, 2026 07:40
@tyreseluo

Copy link
Copy Markdown
Member Author

Thanks for your review.

I think it's best if we put this PR on hold until the LoadingScreen design is completed.

i agree.

It also won't work with the room list service, because that service needs to be able to remove rooms that the user has left. It'd be much clearer and better in the long run to just explicitly add support for left/kicked/banned rooms (and Knocked rooms, since that's the only other type) and to have the RoomsList track those separately.

yep, i agree. I'll give it some more careful thought.

As you mentioned, the current design is still too complex and quite messy.

i will waitting for #640

TigerInYourDream added a commit to Project-Robius-China/robrix2 that referenced this pull request Apr 9, 2026
- Lighten form background from COLOR_SECONDARY (#E3E3E3) to #F5F5F7
- Unify dropdown text to 11.5px matching input fields
- Add vertical centering (align + padding) to DropDownFlat widgets
- Override dropdown colors for light background readability
- Soften field labels from project-robius#333 to project-robius#666 for better hierarchy
- Increase title font from 13px to 14px
- Widen form padding (14→16) and modal spacing (16→18)
- Adjust button widths and spacing for visual balance
TigerInYourDream added a commit to Project-Robius-China/robrix2 that referenced this pull request Apr 10, 2026
- Lighten form background from COLOR_SECONDARY (#E3E3E3) to #F5F5F7
- Unify dropdown text to 11.5px matching input fields
- Add vertical centering (align + padding) to DropDownFlat widgets
- Override dropdown colors for light background readability
- Soften field labels from project-robius#333 to project-robius#666 for better hierarchy
- Increase title font from 13px to 14px
- Widen form padding (14→16) and modal spacing (16→18)
- Adjust button widths and spacing for visual balance
@tyreseluo tyreseluo closed this Jun 1, 2026
tyreseluo added a commit to Project-Robius-China/robrix2 that referenced this pull request Jul 31, 2026
* fix(ui): align timeline chrome to RBX tokens

The most-seen chrome in the timeline was drawn from one-off literals that
matched nothing else in the app.

- Reaction chips: hover was `#fef65b` highlighter yellow, text pure black, and
  the reacted/unreacted pairs were a bespoke green/grey. They now use the accent
  pair the rest of the app already uses for selection, and hover tints 20%
  toward the accent instead of flashing yellow.
- Mention pills: replace the black pill (and the `#d91b38` red used when it
  mentions you) with two tiers of the same accent — a mention of someone else is
  a quiet soft chip, a mention of you or @room is filled. Both branches write
  fill *and* label colour so a pill reused after an edit cannot keep the
  previous emphasis.
- Links: `#x0000EE` was the browser default blue, and hovering any link turned
  it green (`#21B070`) — shared by message links, settings and previews. Add
  `RBX_LINK_HOVER` (same hue, darkened like ACCENT → ACCENT_HOVER) and point all
  three at the tokens.
- Unread badges: mentions keep the conventional red but take the system's
  `RBX_DANGER_FG` rather than pure `#FF0000`, the most saturated pixel in the
  app; "marked unread" moves off the logo cyan to the functional accent, since
  the brand ramp is reserved for brand entry points.

`styles.rs` declares these colours twice (DSL + Rust); both sides now reference
the tokens so they cannot drift apart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ui): unify scrims, selection and modal text with RBX tokens

- Modal scrims came in three values: `RBX_SCRIM` (navy 50%) in two menus, but
  `#000000BB` in search / room info / user profile and `#000000b2` in the
  loading pane, so dimming visibly changed depth depending on which overlay you
  opened. All five are `bg_view := SolidView` backdrops; they now share
  `RBX_SCRIM`.
- The @/slash autocomplete highlighted its selected row in dodger blue
  (`#x1E90FF30`) while every other selected row in the app uses
  `RBX_BG_SELECTED` — and the popup floats directly over the teal composer.
- `room_settings_modal.rs` wrapped RBX-tokenised chrome around 19 hardcoded
  literals, including five levels of text grey (`#000/project-robius#333/project-robius#444/project-robius#666/project-robius#888`)
  sitting next to tokenised titles. Those collapse onto the three RBX text
  levels, and the panel/button fills onto the surface tokens; the file no longer
  contains a hardcoded colour.
- `COLOR_PRIMARY_DARKER` was a stray `#fefefe` belonging to no ramp, which made
  a room's Chat tab a different white from its Info tab. It is now an alias for
  `RBX_BG_SURFACE`; all ten uses are near-white panels or borders, so the 0.4%
  shift is invisible in place while removing the last off-ramp white.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ui): move sticker picker and media players onto RBX tokens

Three files drew from a Tailwind-style palette with no RBX reference at all, so
they read as panels bolted on from another app: the sticker picker sat on
gray-100 with gray-900 text and gray-200 rules, and the audio/video players
paired near-black controls with a cool grey chrome next to the warm navy of
everything around them.

- `sticker_modal.rs`: 28 literals → tokens. Text collapses onto the three RBX
  levels, panel/rule fills onto the surface and stroke tokens, and the error
  line onto `RBX_DANGER_FG`. Its primary button also moves off the deprecated
  legacy blue to `RBX_ACCENT`, per the note in design_tokens.rs that new UI must
  use the accent. Two hover washes reuse the existing `RBX_HIT_HOVER`.
- `audio_message_player.rs` / `video_message_player.rs`: 28 literals → tokens,
  including the players' `#ff4444` error red onto `RBX_DANGER_FG`.

None of the three now contains a hardcoded colour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ui): give the bot badge one look across every surface

The same "this is a bot" concept had four definitions and three appearances, so
one agent looked like a different thing depending on where you saw it: a solid
legacy-blue block in the rooms list and the room title, a soft accent chip in
the message header, and a capitalised "Bot" in the member list.

Both blue pills move to the soft accent chip the timeline already uses, and the
member-list label is lowercased to match. The rooms-list pill's comment claimed
it "reproduces the timeline's bot badge look" while drawing solid blue — it now
actually does, and the comment says why it must.

Leaves the wider legacy-blue deprecation alone: design_tokens.rs states that
blue is "migrated per surface as §5 refactors land", and the bot badge is one
such surface. The other ~40 call sites are not touched here.

The source-assertion test in rooms_list_entry.rs guards the pill's `new_batch`
DrawList structure, which is unchanged; the full suite (579 tests) passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ui): keep styles.rs on literals — it registers before design_tokens

An earlier commit in this branch pointed four `styles.rs` colours at `RBX_*`
tokens. `shared/mod.rs` registers `styles::script_mod` *before*
`design_tokens::script_mod`, so those names did not exist yet and every one of
them failed to resolve at runtime:

    [E] src/shared/styles.rs:216 - property RBX_BG_SURFACE not found in prototype chain
    [E] src/shared/styles.rs:238 - property RBX_DANGER_FG not found in prototype chain

The properties fell back to a grey default, which is what turned the day
dividers, small state events and the "new message" marker into grey blocks.
`cargo check` passes either way — this only shows up in the running app's log,
which is why it was missed.

Restore literals mirroring the token values (`#ffffff`, `#C5392F`, `#119FB3`,
`#8A98AE`) and record *why* they must stay literal, so the next reader does not
"fix" them back. The Rust consts in the same file have no ordering constraint
and keep referencing the tokens directly, which ties the two sides together.

Every other file touched in this branch registers after design_tokens
(shared/mod.rs ≥48, home/, settings/, profile/), so their token references are
fine; styles.rs is the only module with this hazard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ui): retire the bot card's private palette and align both code paths

- The agent card was drawn from seven hand-picked blue-greys (`COLOR_BOT_*`),
  each within ~2% of a real token. That near-miss is exactly what made the card
  read as faintly "off" against the approval card and every other surface nested
  inside it. They are now aliases onto the token layer.
- A bot's inline `code` and quotes changed shade between messages: a body
  containing a fenced block renders through the markdown widget (blue-tinted
  `#EFF5FB`), everything else through the HTML widget (neutral `#EDEDED`). Both
  now use `RBX_BG_SUNKEN`, so the same author's code looks the same either way.
- Expanding a small-state group shifted its summary text 7px left: the collapsed
  `SmallStateEventsSummary` pads 50, while the expanded `group_header` sits
  inside a `body` that already pads 7, totalling 57. The header now pads 43 so
  both land on 50.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Blocked on another issue or missing feature waiting-on-author This issue is waiting on the original author for a response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants