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

PRD-742/fix:Settings tab should have 2 scrollable sections #9218

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

Salman-Apptware
Copy link
Contributor

Checklist

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Nov 9, 2023
@@ -108,7 +112,7 @@ export const SettingsPage = () => {
<Menu
selectable={false}
mode="inline"
style={{ width: 256, marginTop: 8 }}
style={{ width: 256, marginTop: 8, overflowY: 'auto', overflowX: 'hidden' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we extract into a const object above?

Copy link
Contributor Author

@Salman-Apptware Salman-Apptware Nov 16, 2023

Choose a reason for hiding this comment

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

yes we can do it. Changes done are pushed

@@ -19,6 +20,13 @@ interface Props extends TabsProps {
onTabChange?: (selectedTab: string) => void;
}

const RoutedTabsStyle = styled.div`
max-height: 100%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this has impacts across the application. it is widely used. i would recomend we pls try to avoid changing this if possible. why is this needd?

Copy link
Contributor Author

@Salman-Apptware Salman-Apptware Nov 16, 2023

Choose a reason for hiding this comment

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

we can remove max-height it will work same but can't remove flex property because it creating container for inside item and when there is more items it help us to add scroll inside this container. Changes are pushed

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

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

Any simpler ways to achieve this? Can the display: flex, flex-direction; column, overflow: auto live at a parent container under the settings page?

@Salman-Apptware
Copy link
Contributor Author

If we set flex property at a parent container only left and right will only scroll. But What I'm doing is just make section scroll-able which has more data. So if we have more data in tab section only scroll added to that section not whole right section same with table if there is more data in table only table will be scroll-able not the whole right section

@@ -8,6 +8,11 @@ import { UserList } from './user/UserList';
const PageContainer = styled.div`
padding-top: 20px;
width: 100%;
max-height: 100%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this max height necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

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

(why not just height)

Copy link
Collaborator

Choose a reason for hiding this comment

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

it doesn't seem necessary in other places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have kept max-height because if there is lots of data then container can take only 100% height but yes flex doing the same thing so we can remove height.

@@ -20,7 +23,11 @@ const PageTitle = styled(Typography.Title)`
}
`;

const ListContainer = styled.div``;
const ListContainer = styled.div`
display: flex;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this one necesary to have display: flex?
or flex-direction?

overflow i think makes sense

Copy link
Collaborator

Choose a reason for hiding this comment

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

should we use flex: 1 to fill up the remaining space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we remove Flex from ListContainer scroll will go this upper container i have also added video to slack let me know if you have suggestion

@@ -23,11 +28,15 @@ const PageTitle = styled(Typography.Title)`
`;

const Content = styled.div`
height: 100%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use flex: 1 instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have kept height because if there is lots of data then container can take only 100% height but yes flex doing the same thing so we can remove height.

@Salman-Apptware
Copy link
Contributor Author

I have remove unnecessary height from code but we required flex property to get the scroll on required sections

@jjoyce0510 jjoyce0510 merged commit a704290 into datahub-project:master Nov 20, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants