Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing a button for Presence in the 2de kamer #891

Open
wants to merge 8 commits into
base: staging
Choose a base branch
from

Conversation

lodewiges
Copy link
Contributor

@lodewiges lodewiges commented Oct 27, 2024

adds #845

There were 2 ways I was considering implementing it, making a new component or rewriting the original component so that both presences indicators could be taken care of with one controller. I decided to implement a second controller because there are multiple difference between the 2 presences indicators.

needs csvalpha/amber-api#449

Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 2.77778% with 35 lines in your changes missing coverage. Please review.

Project coverage is 13.66%. Comparing base (037e0f2) to head (945c56d).
Report is 10 commits behind head on staging.

Files with missing lines Patch % Lines
app/components/tools/study-room-presence.js 3.03% 32 Missing ⚠️
app/abilities/study-room-presence.js 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging     #891      +/-   ##
===========================================
+ Coverage    13.57%   13.66%   +0.08%     
===========================================
  Files          439      452      +13     
  Lines         3115     3103      -12     
===========================================
+ Hits           423      424       +1     
+ Misses        2692     2679      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lodewiges lodewiges marked this pull request as ready for review October 29, 2024 01:03
@DrumsnChocolate
Copy link
Contributor

cool! I will review this soon. Either this weekend or at our meeting next week

Copy link
Contributor

@DrumsnChocolate DrumsnChocolate left a comment

Choose a reason for hiding this comment

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

Looking very good overall! Differences between this and board-room-presence are abstractable, but that doesn't mean we should. Often, it is better to not introduce abstraction when it does not serve a practical purpose other than reducing the amount of code. This code is more maintainable as it is, because abstraction would introduce complexity.

I have left some remarks, let me know when you've implemented them.

Copy link
Contributor

Choose a reason for hiding this comment

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

this component is written in the old style, please follow the new octane component style. There are a lot of examples that use glimmer components already

specifically, you can take example from https://github.com/csvalpha/amber-ui/pull/635/files#diff-b264f9e9a3db1a61c4d3c4c38a3c454a93a33286c5d2b1e820513bc9d4986084 where I've rewritten the board-room-presence component

Copy link
Contributor

Choose a reason for hiding this comment

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

please also write this template in octane style. Some quick rules (without regard for whether you followed these or not):

  • use angle bracket syntax for inserting components
  • refer to controller properties/functions with this. i.e. this.property or this.someFunction
  • refer to arguments passed to this component using @. So, if the parent component has passed an argument called someArgument, then we can refer to it in this template with @someArgument.
  • do not use the action helper anymore. see Refactor: {{action}} helper usage #635 and Refactor: {{action}} helper usage, the sequel #896 for examples of what to write instead.

please thoroughly familiarize yourself with #429 and the tutorials/guides/resources mentioned there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants