Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions users/discord/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,18 @@ export const App = () => {
if (users.length)
return createElement('main', {}, [
TabsSection({ tabs, activeTab, handleTabNavigation }),
UsersSection({
users,
showUser,
handleUserSelected,
}),
UserDetailsSection({ user: users[showUser] ?? {} }),

createElement('div', { class: 'users_section' }, [
UsersSection({
users,
showUser,
handleUserSelected,
}),
]),

createElement('div', { class: 'user_details_section' }, [
UserDetailsSection({ user: users[showUser] ?? {} }),
]),
Comment on lines +59 to +70
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to create the div here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

]);

return createElement('main', {}, [
Expand Down
1 change: 0 additions & 1 deletion users/discord/components/UserDetailsSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const UserDetailsSection = ({
return createElement(
'section',
{
class: 'user_details_section',
'data-testid': 'user-details-section',
},
[
Expand Down
19 changes: 11 additions & 8 deletions users/discord/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ main {
grid-template-areas:
'tab tab '
'aside details';
}

.users_section {
grid-area: aside;
overflow: scroll;
padding-inline: 1rem;
height: 100%;
}

.tabs_section {
Expand All @@ -43,6 +38,13 @@ main {
border: 2px solid gray;
}

.users_section {
grid-area: aside;
overflow-y: auto;
padding-inline: 1rem;
max-height: 20rem;
}

.user_card {
padding: 1rem;
display: flex;
Expand All @@ -62,15 +64,16 @@ main {
}

.user_details_section {
grid-area: details;
padding: 1rem;
margin: 0 1rem;
background-color: var(--light-gray);
position: sticky;
height: 100%;
}

.user_details_field {
padding: 0.5rem;
}

.no_user_found {
width: 100vw;
text-align: center;
Expand Down
Loading