-
Notifications
You must be signed in to change notification settings - Fork 30
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
refactor Event Schedule UI for new design + add personal schedule #1302
Conversation
Code Climate has analyzed commit df146ea and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Visit the preview URL for this PR (updated for commit df146ea): https://co-reality-staging--preview-pr-1302-dca4vx19.web.app (expires Tue, 01 Jun 2021 13:51:28 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
@mike-lvov Should this branch be targeting |
@0xdevalias yes, it should be applied to all of the envs. Synced with @mobilevinay on this one. |
598ce33
to
d97a828
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.
Looks valid. LGTM to merge in. A few non blocking comments to fix after it is merged
src/components/molecules/EventPaymentButton/EventPaymentButton.tsx
Outdated
Show resolved
Hide resolved
$ScheduleEvent--margin-top: 0.25rem; | ||
$ScheduleEvent--height: 3.75rem; | ||
$ScheduleEvent--padding: 0 0.25rem 0 0.75rem; | ||
$ScheduleEvent--border-radius: 18px; | ||
$ScheduleEvent--box-shadow: 0 5px 10px rgba(0, 0, 0, 0.65); | ||
|
||
$bookmark--padding: 0.5rem; | ||
$bookmark-hover--padding-top: 0.375rem; |
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.
[NB] Any reasons to have them in rem?
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.
Ref:
- https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#relative_length_units
-
Relative length units are relative to something else, perhaps the size of the parent element's font, or the size of the viewport. The benefit of using relative units is that with some careful planning you can make it so the size of text or other element scales relative to everything else on the page.
-
rem
: Font size of the root element.
-
} | ||
|
||
&__info { | ||
font-size: 0.8rem; |
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.
[NB] use fontsize from const. 0,8 * 16 =~ 12
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.
@mike-lvov Is the const in px
? Moving to using em
/rem
across the codebase is probably a better overall solution for font-size
than using scss const's I would think?
See docs link in #1302 (comment)
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.
@0xdevalias I don't mind moving to em/rem eventually. What I want to have is consistency & to achieve it, we should use the defined font-size consts(which are currently defined in px, but can be changed to rem/em in 5 lines of code, which would apply across the app)
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, fair enough, makes sense.
text-overflow: ellipsis; | ||
display: block; | ||
margin-top: $description--margin-top; | ||
font-size: 0.7rem; |
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.
[NB] Same as above ^
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.
See my comments in #1302 (comment)
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.
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.
not sure what to do with this one.
It should be less than 12px (event title), and we have $font-size--xs: 10px
, but IMO it's too small.
12px + 10px (host label is more difficult to read)
Should I create a new constant then (11px)? And how should I name it?
xs = 11px
xxs = 10px?
current list:
$font-size--xs: 10px;
$font-size--sm: 12px;
$font-size--md: 14px;
$font-size--lg: 16px;
$font-size--xl: 20px;
// Not sure this is the best naming for these
$font-size--xxl: 30px;
$font-size--xxxl: 50px;
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.
@mike-lvov Thoughts?
src/components/molecules/ScheduleVenueDescription/ScheduleVenueDescription.scss
Show resolved
Hide resolved
} | ||
|
||
&__desc { | ||
font-size: 0.8rem; |
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.
[NB] use from constants
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.
See my comments in #1302 (comment)
src/components/molecules/ScheduleVenueDescription/ScheduleVenueDescription.scss
Show resolved
Hide resolved
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.
Most of the review comments here are NB
and can be cleaned up in a followup PR. There are a couple of things that should be fixed up in this PR though (though they are relatively small/quick fixes)
I'm going to pre-emptively approve this to unblock you, but please make sure to fix though not-NB comments before merging (and maybe get @mike-lvov to skim through them to ensure they seem to fix the issues if you want to be certain)
src/components/molecules/EventPaymentButton/EventPaymentButton.tsx
Outdated
Show resolved
Hide resolved
bc3ac72
to
61c8d31
Compare
fef4bdc
to
a37241a
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.
[Retroactive Review] A final pass over the changed files, calling out additional things since the last review.
@sunny-viktoryia It would be good to get these fixed up in a future followup PR, as well as the outstanding items called out in previous reviews.
message?: string; | ||
} | ||
|
||
export const Loading: FC<LoadingProps> = ({ message }) => { |
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.
React.FC
instead of just FC
.
Also, message should have a default value here. Probably "Loading..."
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.
used React.FC
: 880f966
and about default message. hmm. I wouldn't specify that. According to our styleguide there can be loading without text.
http://sapiens.chat/sparkle/styleguide/
So, in case the text is not needed we can use this component.
what would you say?
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.
and about default message. hmm. I wouldn't specify that. According to our styleguide there can be loading without text.
I guess it depends what is likely to be our more common pattern. If we are going to write "Loading..." all over the place then it probably makes sense to default the text and then potentially add another optional prop for imageOnly
or similar.
If we're more likely to use it without text, then not setting the default might be a better idea.
cc // @mike-lvov Thoughts?
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.
@0xdevalias I would say that not having the default loading
text makes sense just to handle a case when there is no text at all as per
According to our styleguide there can be loading without text
For other cases, I think we explicitly more specific message than Loading...
closes https://github.com/sparkletown/internal-sparkle-issues/issues/485
LiveSchedule
component as it's no longer used a6cd04bSchedulePage
component as its' no longer used a6cd04bPreview:
Feature structure:
SchedulePageModal
is the main component which appears and hides onSchedule
button click.ScheduleVenueDescription
contains general information about the parent (if exists) or current venue.Schedule
the component which contains all the information about events of the selected day.ScheduleRoomEvents
is just a map of events in the room line.ScheduleEvent
is the component of the particular event.There is a component
EventDisplay
which was modified by Ivan (ScheduleEvent
in my case). But it's used in several places and I'm not sure if it was safe to modify it. If we don't have anything schedule-related in the project, we might want to remove that piece as well. Open to your thoughts.