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

Standup meeting group refactor #138

Merged
merged 36 commits into from
Aug 1, 2023
Merged

Conversation

toyhammered
Copy link
Collaborator

@toyhammered toyhammered commented Jul 3, 2023

What's the change?

  • Refactors Standup Meeting group Index
  • removes dynamic buttons from joinable items
  • Adds joined card component
  • Adds ability to join and leave standup meeting groups from Index
  • Styled view and components to reflect wireframes

Notes:

This PR successfully addresses the majority of the specifications outlined in the provided wireframes design. However, we made the decision to split two functionalities into separate issues for better management and clarity.

  1. Check-in buttons in the joined_card components
  2. Checking messages in joined_card components

These two features turned out to be more involved than initially anticipated. Separating them allows us to focus on their implementation more effectively. Also, potential updates outside of this issue might improve how we address them.

Checklist before requesting a review

  • Did you add appropriate automated tests?
  • Did you consider risks around security, performance, etc.?
  • Have you thought of misfiring code? e.g. too many loops, n+1, or how to handle nils?
  • Related to readability and consistency: Did you add comments and/or documentation? (README, Notion, etc.)
  • Is everything elevated to the highest level? (e.g., can logic be moved out of view into controllers, or out of controllers into models?)
  • Did you leave helpful inline PR comments for the reviewer(s)?
  • Did you include instructions for how to test in the ticket?
  • Did you add appropriate automated tests?
Screen.Recording.2023-07-25.at.1.02.32.PM.mov
Screen.Recording.2023-07-29.at.12.10.59.PM.mov

Screen Shot 2023-07-29 at 12 16 46 PM

toyhammered and others added 9 commits July 2, 2023 20:47
…-learning/PairApp into standup-meeting-group-refactor
joined_card_component.rb
co-author: Roc Devenport rubykod@gmail.com
destroy action
co-author: Roc Devenport rubykod@gmail.com
joined_card_component.html.erb
co-authored-by: Roc Devenport rubykod@gmail.com
controller to render turbo stream on destroy
co-authored-by: RocDavenport rubykod@gmail.com
@GALTdea GALTdea marked this pull request as ready for review July 22, 2023 02:35
@JoshDevHub
Copy link
Collaborator

@GALTdea Make sure you fix the CI failures. Looks like something isn't passing lint.

@afogel
Copy link
Collaborator

afogel commented Jul 22, 2023

it would also be helpful if you could add screenshots/flesh out the context for the reviewer, e.g. https://fogel.dev/software/what_makes_a_good_pr/

@@ -2,6 +2,7 @@

class FlashComponent < ViewComponent::Base
TYPE_THEMES = {
success: 'success',
Copy link
Collaborator

Choose a reason for hiding this comment

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

lol, while I generally agree that this should probably be success across the board rather than notice, I'm wondering whether this is the PR to do it or whether we can use the existing notice Flash and kick updating to success to another PR?

@GALTdea
Copy link
Collaborator

GALTdea commented Jul 22, 2023

@GALTdea Make sure you fix the CI failures. Looks like something isn't passing lint.

Thanks for the review Josh! I did see one error that was related to a variable length, I'll try to fix it today!

@GALTdea
Copy link
Collaborator

GALTdea commented Jul 22, 2023

it would also be helpful if you could add screenshots/flesh out the context for the reviewer, e.g. https://fogel.dev/software/what_makes_a_good_pr/

Oh that's right, I forgot 😅. Thanks for the review Ariel

@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.52% 🎉

Comparison is base (908b3f0) 96.57% compared to head (11bf6c0) 97.10%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
+ Coverage   96.57%   97.10%   +0.52%     
==========================================
  Files         119      123       +4     
  Lines        1488     1518      +30     
==========================================
+ Hits         1437     1474      +37     
+ Misses         51       44       -7     
Files Changed Coverage Δ
app/components/flash_component.rb 100.00% <ø> (ø)
...s/standup_meeting_group/joinable_item_component.rb 100.00% <100.00%> (ø)
...nts/standup_meeting_group/joined_card_component.rb 100.00% <100.00%> (ø)
app/models/standup_meeting_group.rb 90.90% <100.00%> (+2.02%) ⬆️
...ndup_meeting_group/joinable_item_component_spec.rb 100.00% <100.00%> (ø)
...tandup_meeting_group/joined_card_component_spec.rb 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes

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

afogel
afogel previously requested changes Jul 22, 2023
Copy link
Collaborator

@afogel afogel left a comment

Choose a reason for hiding this comment

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

Good first attempt! That said, I think there's a bit more work beyond getting the core functionality to work.

Copy link
Collaborator

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

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

Some comments and nits about the markup and CSS but this is looking like good progress.

Most urgent things:

  1. A bit worried about the Card container wrapping on mobile. It doesn't at all for me, but judging from your videos, it does for you. I'm definitely interested in getting to the bottom of that. What browser are you using?
  2. The dynamic buttons on the Cards should definitely be added before merging this imo.

<div class="w-1/2">
<div class="card-actions flex space-x-2 justify-end">
<button class="btn btn-sm">Check In</button>
<button class="btn btn-sm">Dismiss</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are still plans to add the dynamic behavior here, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

you mean checkin and dismiss? (btw changed the button name to skip). Seems like this could be a different issue, but I'll ask @toyhammered

app/controllers/standup_meeting_groups/joins_controller.rb Outdated Show resolved Hide resolved

respond_to do |format|
format.turbo_stream do
render turbo_stream: turbo_stream.update(helpers.dom_id(@standup_meeting_group, :join_or_leave), component)
flash.now[:notice] = "You have joined #{@standup_meeting_group.name}!"
render 'standup_meeting_groups/joins/create'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pretty sure this render call is unnecessary.

<button class="btn btn-sm">Check In</button>
<button class="btn btn-sm">Dismiss</button>
<br>
<%= link_to 'Leave', standup_meeting_group_join_path(@standup_meeting_group, @standup_meeting_group_user), data: { turbo_method: :delete }, class: 'btn btn-link align-bottom' %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like they've pulled leaving off the card in the wireframes. Maybe worth asking Daniel or Ariel about this and if they still want it here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, yes I see. I'll post a question in discord

app/views/standup_meeting_groups/index.html.erb Outdated Show resolved Hide resolved
app/views/standup_meeting_groups/index.html.erb Outdated Show resolved Hide resolved
app/views/standup_meeting_groups/index.html.erb Outdated Show resolved Hide resolved
@GALTdea GALTdea force-pushed the standup-meeting-group-refactor branch from 5bfb79e to 017e16b Compare July 29, 2023 18:31
Copy link
Collaborator

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

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

Just a couple of small things to fix and I think it's good to merge. Looks awesome and this code is definitely quite a bit simpler than what was here previously. Awesome work

@GALTdea GALTdea requested a review from JoshDevHub August 1, 2023 00:52
Copy link
Collaborator

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

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

Awesome work!

@JoshDevHub JoshDevHub merged commit 8b767a1 into main Aug 1, 2023
3 checks passed
@JoshDevHub JoshDevHub deleted the standup-meeting-group-refactor branch August 1, 2023 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants