Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix: No way to open chat in video rooms with new header. #11752

Conversation

manancodes
Copy link
Contributor

@manancodes manancodes commented Oct 15, 2023

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Fixes: element-hq/element-web#26181
Signed-off-by: Manan Sadana manancodes.dev@gmail.com

Before:
Screenshot 2023-10-15 at 6 58 00 PM

After:
Screenshot 2023-10-15 at 7 43 34 PM

Type: defect


Here's what your changelog entry will look like:

🐛 Bug Fixes

@github-actions github-actions bot added Z-Community-PR Issue is solved by a community member's PR T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems labels Oct 15, 2023
@manancodes
Copy link
Contributor Author

Also, I will add the tests and update snapshots. But before that I would like somebody to review the implementation once.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a reasonable start, though I'm not an expert in this area of the code.

Comment on lines +91 to +93
* {
fill: $icon-button-color;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like it would be better to update the SVG to have fill="currentColor" than to forcibly override it here. Generally, I don't think it should be necessary to have a dedicated CSS class. (There isn't one for the "threads" button, for example.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into this and try to implement your suggestion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manancodes have you had a chance to look at this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it again. The other icons being used are imported from the vector-im/compound-design-tokens library. Which is why it does not require any additional css.
Screenshot 2023-11-07 at 8 00 34 PM

And the chat icon present there is an outline icon, which does not go well with the other icons.
https://github.com/vector-im/compound-design-tokens/blob/main/icons/chat.svg

In the legacy header, the SVG is used as a mask and background color property is added to the icon.

background-color: $icon-button-color;

So I used that Icon and applied css to have dynamic colors according to the selected theme. What is the right way to tackle this? Should the filled chat icon be added in the Library? What is the procedure for that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Yes, it definitely looks like we should be using a Compound design icon here, since all the other buttons in the header use one. And you're right that there only seems to be an outline icon there at the moment.

@kerryarchibald as our Compound Champion, can you advise on the best approach here?

src/components/views/rooms/RoomHeader.tsx Show resolved Hide resolved
{isVideoRoom && (
<Tooltip label={_t("right_panel|video_room_chat|title")}>
<IconButton
// indicator={notificationColorToIndicator(threadNotifications)} TODO: This still needs work
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you plan to implement this as part of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But I need some help with this part. I'm not able to figure out what to pass in this argument.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok leave it for now and we can open a follow-up issue.

@manancodes

This comment was marked as off-topic.

@richvdh

This comment was marked as off-topic.

@richvdh richvdh removed their request for review October 23, 2023 13:47
@manancodes

This comment was marked as off-topic.

@richvdh

This comment was marked as off-topic.

src/components/views/rooms/RoomHeader.tsx Show resolved Hide resolved
Comment on lines +91 to +93
* {
fill: $icon-button-color;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into this and try to implement your suggestion.

{isVideoRoom && (
<Tooltip label={_t("right_panel|video_room_chat|title")}>
<IconButton
// indicator={notificationColorToIndicator(threadNotifications)} TODO: This still needs work
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But I need some help with this part. I'm not able to figure out what to pass in this argument.

src/components/views/rooms/RoomHeader.tsx Show resolved Hide resolved
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid dedicated CSS per earlier comment, please

@richvdh
Copy link
Member

richvdh commented Nov 9, 2023

@manancodes apart from the question about the icon, we could do with some tests for this change. Would you be able to add tests please?

@manancodes
Copy link
Contributor Author

Yes. I'll write some tests for it.

@richvdh richvdh removed their request for review November 10, 2023 08:53
@kerryarchibald
Copy link
Contributor

Hi @manancodes, a solid chat icon is available in the latest design tokens release https://github.com/vector-im/compound-design-tokens/releases/tag/v0.1.0
You can check the available icons here https://compound.element.io/?path=/docs/tokens-icons--docs

@kerryarchibald
Copy link
Contributor

Thanks for your work on this @manancodes, this issue was fixed by #11911

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Video Room Chat Header Button Removed
4 participants