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

refactor Event Schedule UI for new design + add personal schedule #1302

Merged
merged 74 commits into from May 18, 2021

Conversation

igachmovmelon
Copy link
Contributor

@igachmovmelon igachmovmelon commented Apr 2, 2021

closes https://github.com/sparkletown/internal-sparkle-issues/issues/485

  • Removed LiveSchedule component as it's no longer used a6cd04b
  • Removed SchedulePage component as its' no longer used a6cd04b

Preview:
image

Feature structure:

SchedulePageModal                           <---  I suggest renaming it to ScheduleModal
├── ScheduleVenueDescription
├── Schedule
       ├── rooms 
       ├── ScheduleRoomEvents
               ├── ScheduleEvent

SchedulePageModal is the main component which appears and hides on Schedule 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.

@igachmovmelon igachmovmelon temporarily deployed to feature-preview April 2, 2021 12:08 Inactive
@github-actions github-actions bot added the 💎 styles For (S)CSS style related issues/changes/improvements/etc. label Apr 2, 2021
@codeclimate
Copy link

codeclimate bot commented Apr 2, 2021

Code Climate has analyzed commit df146ea and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 2

View more on Code Climate.

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

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 🌎

@igachmovmelon igachmovmelon changed the title Feature/schedule Feature/schedule ohbm Apr 2, 2021
@igachmovmelon igachmovmelon temporarily deployed to feature-preview April 2, 2021 16:32 Inactive
@igachmovmelon igachmovmelon temporarily deployed to feature-preview April 2, 2021 16:33 Inactive
@0xdevalias 0xdevalias added the 💡 new-feature New idea/feature request label Apr 6, 2021
@0xdevalias 0xdevalias self-requested a review April 6, 2021 03:49
@0xdevalias
Copy link
Contributor

@mike-lvov Should this branch be targeting staging as our new canonical schedule, or is it going to be merged directly into the custom environment?

@mike-lvov
Copy link
Contributor

@0xdevalias yes, it should be applied to all of the envs. Synced with @mobilevinay on this one.

src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/components/molecules/EventDisplay/EventDisplay.tsx Outdated Show resolved Hide resolved
src/utils/time.ts Outdated Show resolved Hide resolved
src/utils/time.ts Outdated Show resolved Hide resolved
src/utils/time.ts Outdated Show resolved Hide resolved
@igachmovmelon igachmovmelon temporarily deployed to feature-preview April 9, 2021 11:45 Inactive
@0xdevalias 0xdevalias changed the title Feature/schedule ohbm Improve the Event Schedule UI Apr 12, 2021
@0xdevalias 0xdevalias temporarily deployed to feature-preview April 12, 2021 03:50 Inactive
Copy link
Contributor

@mike-lvov mike-lvov left a 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

Comment on lines +11 to +18
$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;
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ref:

}

&__info {
font-size: 0.8rem;
Copy link
Contributor

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

Copy link
Contributor

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)

Copy link
Contributor

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)

Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

[NB] Same as above ^

Copy link
Contributor

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)

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

0.8 rem + 0.7 rem
image

12px + 10px (host label is more difficult to read)
image

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;

Copy link
Contributor

Choose a reason for hiding this comment

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

@mike-lvov Thoughts?

}

&__desc {
font-size: 0.8rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

[NB] use from constants

Copy link
Contributor

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)

Copy link
Contributor

@0xdevalias 0xdevalias left a 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/api/profile.ts Show resolved Hide resolved
src/api/profile.ts Show resolved Hide resolved
src/components/molecules/NavBar/NavBar.tsx Outdated Show resolved Hide resolved
src/utils/time.ts Show resolved Hide resolved
src/utils/time.ts Show resolved Hide resolved
src/utils/time.ts Show resolved Hide resolved
src/utils/time.ts Outdated Show resolved Hide resolved
src/utils/time.ts Outdated Show resolved Hide resolved
@0xdevalias 0xdevalias changed the title Improve the Event Schedule UI refactor Event Schedule UI for new design + add personal schedule May 18, 2021
@sunny-viktoryia sunny-viktoryia temporarily deployed to feature-preview May 18, 2021 13:48 Inactive
@mike-lvov mike-lvov merged commit d5e8fa7 into staging May 18, 2021
@mike-lvov mike-lvov deleted the feature/schedule branch May 18, 2021 14:08
Copy link
Contributor

@0xdevalias 0xdevalias left a 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.

src/assets/icons/icon-loading.svg Show resolved Hide resolved
message?: string;
}

export const Loading: FC<LoadingProps> = ({ message }) => {
Copy link
Contributor

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..."

Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor

@mike-lvov mike-lvov May 27, 2021

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...

src/components/molecules/NavBar/NavBar.tsx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement Enhancements/improvements to existing functionality 💎 styles For (S)CSS style related issues/changes/improvements/etc. ✨ UI/UX For UI/UX related issues, let's make the platform and customer experience sparkle! ✨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants