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

Add help screen layout #116

Merged
merged 17 commits into from
Feb 15, 2023
Merged

Add help screen layout #116

merged 17 commits into from
Feb 15, 2023

Conversation

lubej
Copy link
Collaborator

@lubej lubej commented Feb 9, 2023

Solution

Add help screen on mobile version

  • add SwiperJs dependency for carousel effect;

Links

@lubej lubej marked this pull request as ready for review February 10, 2023 08:20
@lubej lubej requested review from buberdds, lukaw3d and csillag and removed request for buberdds, lukaw3d and csillag February 10, 2023 08:20
@buberdds
Copy link
Contributor

that lib throws some warnings https://github.com/mui/material-ui/issues/33274 but I didn't inspect it yet

@lubej
Copy link
Collaborator Author

lubej commented Feb 13, 2023

mui/material-ui#33274

Good point. Will migrate to SwiperJs. As react-swipeable-views seems unmaintained.

disabled: boolean
}

const ParaTimeSelectorGlow = styled(Box, {
shouldForwardProp: (prop: string) =>
!(['disabled'] as (keyof ParaTimeSelectorProps)[]).includes(prop as keyof ParaTimeSelectorProps),
})<ParaTimeSelectorProps>(({ disabled, theme }) => ({
!(['disabled'] as (keyof ParaTimeSelectorBaseProps)[]).includes(prop as keyof ParaTimeSelectorBaseProps),
Copy link
Contributor

Choose a reason for hiding this comment

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

do we even need shouldForwardProp for disabled attr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I rather leave it, for cases where [disabled] style selector is globally applied, to not conflict with styling.

return false
}

switch (step) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we using switch statement to handle boolean ? Can't we just write
step === ParaTimeSelectorStep.ShowHelpScreen. Additionally, do we even need utils for such simple case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that mobile version would be more complex. Simplified the simple switch statements to ifs, but I would keep the utils. If you feel strongly against I can move it into component.

@lubej lubej requested a review from buberdds February 14, 2023 09:40
// declaration in d.ts file declaration not correctly recognized
declare global {
namespace JSX {
interface IntrinsicElements {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move it to src/types file?

src/styles/theme/defaultTheme.ts Outdated Show resolved Hide resolved
src/app/pages/HomePage/index.tsx Outdated Show resolved Hide resolved

useEffect(() => {
const handleSlideChange = (e: Event) => {
const [swiper] = (e as SlideChangeEvent).detail
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these types correct? handleSlideChange e param is a type of SlideChangeEvent not Event, right?

@lubej lubej requested a review from buberdds February 14, 2023 15:02
src/index.tsx Outdated
Comment on lines 18 to 20
import { register } from 'swiper/element/swiper-element'
// register Swiper custom elements
register()
Copy link
Member

Choose a reason for hiding this comment

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

How come we aren't using 'swiper/react'?

Copy link
Member

Choose a reason for hiding this comment

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

ah, i see, "Swiper React components will likely to be removed in future versions. It is recommended to migrate to Swiper Element instead."

src/index.tsx Outdated Show resolved Hide resolved
@lubej lubej requested a review from lukaw3d February 15, 2023 07:58
@lubej lubej merged commit a90e0b9 into master Feb 15, 2023
@lubej lubej deleted the ml/mobile-help-screen branch February 15, 2023 08:07
@lukaw3d
Copy link
Member

lukaw3d commented Feb 16, 2023

Something broke on small screens with this PR:

Before After
localhost_1234_ localhost_1234_ (1)

@lukaw3d
Copy link
Member

lukaw3d commented Feb 17, 2023

I'm also seeing:
image

component="img"
sx={{
display: 'block',
width: '100%',
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 causing issue @lukaw3d was showing

@lubej lubej mentioned this pull request Feb 21, 2023
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.

None yet

3 participants