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

Fix unable to view loading circular progress #4043

Merged
merged 2 commits into from
Jul 28, 2022

Conversation

biaoli0
Copy link
Contributor

@biaoli0 biaoli0 commented Jul 25, 2022

Copy link
Member

@edmofro edmofro left a comment

Choose a reason for hiding this comment

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

Got a question for you

@@ -34,6 +34,10 @@ const MuiButton = styled(MuiIconButton)`
color: #666666;
`;

const EmptyView = styled.div`
height: 50vh;
Copy link
Member

Choose a reason for hiding this comment

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

Where does 50vh come from? Seems pretty magic to me, and I can't see what it relates to...

Copy link
Contributor Author

@biaoli0 biaoli0 Jul 26, 2022

Choose a reason for hiding this comment

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

Yeah it is a very special case for LoadingContainer. EmptyView will help us to control the height of LoadingContainer dynamically.
The first thing is the height of LoadingContainer is the height of its child component. The existing problem is LoadingContainer current child isExportView, and its height is fixed, so when loading, if client has a small screen they cannot see the loading circular progress, unless they drag down.
I choose to adapt the behaviour of LoadingContainer since it got used by many places.

Copy link
Member

Choose a reason for hiding this comment

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

Right I get it!

How about something like this? https://github.com/beyondessential/tupaia/pull/4048/files

The EmptyView wasn't as clear to me as an "isLoading" prop that defines the different styles

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's much clearer @edmofro thanks! Nice one.

@biaoli0 biaoli0 requested a review from edmofro July 28, 2022 06:39
Copy link
Member

@edmofro edmofro left a comment

Choose a reason for hiding this comment

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

Nice changes ;-)

@biaoli0 biaoli0 merged commit f7200b5 into dev Jul 28, 2022
@biaoli0 biaoli0 deleted the lesmis-unable-to-view-loading-circlar-progress branch July 28, 2022 23:20
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.

2 participants