-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Meetings module adjustments #14086
Conversation
bsatarnejad
commented
Nov 3, 2023
•
edited
Loading
edited
- 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).
406126f
to
a93c78c
Compare
…ect into meetings-module-adjustments
43263d9
to
679bbbc
Compare
…ect into meetings-module-adjustments
e076524
to
6ad05f1
Compare
…ect into meetings-module-adjustments
00f1d11
to
0489328
Compare
There was a problem hiding this 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
- There is a space in between the list of users
- 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"
|
||
import { Controller } from '@hotwired/stimulus'; | ||
|
||
export default class MeetingsSidebarParticipantsController extends Controller { |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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
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" |
There was a problem hiding this comment.
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
tofit-content(40px)
. I admit, that I have not tested it in detail, but it would be nice to get rid of the extra stuff.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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 | ||
|
There was a problem hiding this comment.
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.
@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 |
There was a problem hiding this comment.
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.
@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 |
There was a problem hiding this comment.
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.
…ect into meetings-module-adjustments
…ect into meetings-module-adjustments