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

Meetings module adjustments #14086

Merged
merged 52 commits into from
Nov 16, 2023
Merged

Meetings module adjustments #14086

merged 52 commits into from
Nov 16, 2023

Conversation

bsatarnejad
Copy link
Contributor

@bsatarnejad bsatarnejad commented Nov 3, 2023

  • Add "Add notes" option to the agenda item more menu.
  • Remove the words "Added by" from agenda items (all viewports).
  • Add "." after the "Last updated {time}" text at the top.
  • When a meeting is closed, the more button (...) disappears as it should.
  • Make the "Duration" field in the agenda item shorter and change the placeholder text from "Duration (in minutes)" to "Duration (min)"
  • The "Show/hide {n} more" link should go to the bottom of the participant list when it is expanded.
  • Mobile: The "Meeting details" section should be at the top (before agenda items).
  • Mobile, the meeting status part is shortened (the text is removed and the Status and "Close meeting" button are in the same line).

@bsatarnejad bsatarnejad force-pushed the meetings-module-adjustments branch from 406126f to a93c78c Compare November 6, 2023 10:04
@bsatarnejad bsatarnejad force-pushed the meetings-module-adjustments branch from 43263d9 to 679bbbc Compare November 7, 2023 07:57
@bsatarnejad bsatarnejad force-pushed the meetings-module-adjustments branch from e076524 to 6ad05f1 Compare November 9, 2023 08:45
@bsatarnejad bsatarnejad force-pushed the meetings-module-adjustments branch from 00f1d11 to 0489328 Compare November 9, 2023 15:15
Copy link
Contributor

@HDinger HDinger left a comment

Choose a reason for hiding this comment

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

Hi @bsatarnejad

It is already in quite a good state. There are two major blockers for me:

  • Please reduce the CSS file code, as we agreed to only use if for layouting
  • The code for the participants is now completely doubled. Please move what is need to the component itself and add a parameter to show all participants inline. Thus you'd only have to call the component, and no second controller or additional methods.

Further, I found some things while clicking through:

  • There is no space between the "Sho/hide more" button and the last user
Bildschirmfoto 2023-11-10 um 12 19 16
  • There is a space in between the list of users
Bildschirmfoto 2023-11-10 um 12 19 23
  • It felt weird to read "Show/hide X more" on mobile, as there was nothing shown at all. Maybe we want to change that text to something like "Show/Hide X users"
Bildschirmfoto 2023-11-10 um 12 23 01


import { Controller } from '@hotwired/stimulus';

export default class MeetingsSidebarParticipantsController extends Controller {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is literally the same code as the MeetingsSidebarDetailsController just with a different name. Please avoid that dubplication and use the same controller for the same logic.

@@ -1,5 +1,5 @@
<%=
grid_layout('op-meeting-agenda-item', tag: :div) do |grid|
grid_layout((meeting_open? ? 'op-meeting-agenda-item' : 'closed-meeting op-meeting-agenda-item'), tag: :div) do |grid|
Copy link
Contributor

Choose a reason for hiding this comment

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

The first parameter of the grid-layout is used for the grid-defintions, so please do not use it for plain classes. Further, closed-meeting should be a modifier of the agenda-item, e.g. op-meeting-agenda-item--closed

Comment on lines 30 to 31
grid-template-columns: 20px auto 1fr minmax(auto, $meeting-agenda-item--author-width)
grid-template-areas: "drag-handle content duration author" ". notes notes notes notes"
Copy link
Contributor

Choose a reason for hiding this comment

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

I see multiple issues with that:

  • The template-areas definition is invalid, as there are too many columns defined in the second row.
  • I think the whole extra definition as well as the modifier is not needed if you change the original defintion if the last column to from 40px to fit-content(40px). I admit, that I have not tested it in detail, but it would be nice to get rid of the extra stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it works correctly

details.with_row(mt: 2, classes: 'op-meeting-sidebar-details-participants') do
flex_layout do |flex|
render(Primer::Beta::Octicon.new(icon: 'people'))
flex.with_row(classes: 'd-none', data: { 'meetings-sidebar-details-target': "hiddenParticipants" }) do
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not set the primer classes by yourself, but use the system_arguments for that.

details.with_row(mt: 2, classes: 'op-meeting-sidebar-details-participants') do
flex_layout do |flex|
render(Primer::Beta::Octicon.new(icon: 'people'))
flex.with_row(classes: 'd-none', data: { 'meetings-sidebar-details-target': "hiddenParticipants" }) do
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not set the primer classes by yourself, but use the system_arguments for that.

Please also change that in the sidebar, where the same thing is done.

Comment on lines 58 to 80
def render_participant(participant)
flex_layout(align_items: :center) do |flex|
flex.with_column(classes: 'ellipsis') do
render(Users::AvatarComponent.new(user: participant.user,
size: :medium,
classes: 'op-principal_flex'))
end
render_participant_state(participant, flex)
end
end

def render_participant_state(participant, flex)
if participant.attended?
flex.with_column(ml: 1) do
render(Primer::Beta::Text.new(font_size: :small, color: :subtle)) { t("description_attended").capitalize }
end
elsif participant.invited?
flex.with_column(ml: 1) do
render(Primer::Beta::Text.new(font_size: :small, color: :subtle)) { t("description_invite").capitalize }
end
end
end

Copy link
Contributor

Choose a reason for hiding this comment

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

This code is duplicated, so I think it is worth to move it to the component itself, and just call the component.

Comment on lines 1 to 12
@import 'helpers'
.op-meeting-sidebar-details-participants
display: none
&-button
padding: 0 !important
color: var(--content-link-color)



@media screen and (max-width: $breakpoint-sm)
.op-meeting-sidebar-details-participants
display: block !important
Copy link
Contributor

Choose a reason for hiding this comment

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

CSS files of components should only contain layouting CSS and things that cannot be done with the system_arguments. That means, this whole file should be not needed. You can define the display value depending on the breakpoint like this: d: : [:none, :block, :none, :none, :none]. See here for more information. The color and the padding can also be defined via the system_arguments.

Comment on lines 3 to 9
@media screen and (max-width: $breakpoint-sm)
.op-meeting-sidebar-state
flex-direction: row !important
justify-content: space-between
align-items: center
&-edit
margin-top: 0 !important
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as before: All of this could be shown with system_arguments. I am fine with keeping the flex defintion, but please remove the margin, as well as the extra class for it.

@bsatarnejad bsatarnejad requested a review from HDinger November 14, 2023 06:35
@bsatarnejad bsatarnejad marked this pull request as ready for review November 14, 2023 07:40
@bsatarnejad bsatarnejad requested review from HDinger and removed request for HDinger November 15, 2023 12:59
@oliverguenther oliverguenther merged commit 2663f19 into dev Nov 16, 2023
11 checks passed
@oliverguenther oliverguenther deleted the meetings-module-adjustments branch November 16, 2023 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants