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

Feat/fct 16897/new tab layout #360

Merged
merged 22 commits into from
Aug 5, 2024
Merged

Feat/fct 16897/new tab layout #360

merged 22 commits into from
Aug 5, 2024

Conversation

RamProg
Copy link
Contributor

@RamProg RamProg commented Jul 31, 2024

🚪 Why?

We are working on a new Profile with a whole new layout. We want to start this Layout in Factorial One and potentially reuse it in different screens.

🔑 What?

This Layout has a breadcrumb, a header, a tab navigation system and a content. The content will change when a different tab is selected. The Layout should be able to know how to handle this behaviour without including any content within itself, so it should be smart enough to navigate, but without needing to know what's inside.

Responsiveness is not required yet. This is my first PR on F1 so please feel free to point out any practices that could be improved. We want this to be a solid base for building future new screens in Factorial.

🏡 Context

https://www.figma.com/design/9pLsRzdinid0ha0qRWta2D/Employee-Profile?node-id=378-17717&m=dev
https://factorialmakers.atlassian.net/browse/FCT-16897

📸 Visual proof

image

@RamProg RamProg requested a review from a team as a code owner July 31, 2024 13:54
@RamProg RamProg requested review from josepjaume and a team July 31, 2024 13:55
@RamProg RamProg self-assigned this Jul 31, 2024
Copy link

github-actions bot commented Jul 31, 2024

🔍 Visual review for your branch is published 🔍

Here are the links to:

lib/components/Blocks/Header/index.tsx Outdated Show resolved Hide resolved
lib/components/Blocks/Header/index.tsx Outdated Show resolved Hide resolved
lib/components/Blocks/Header/index.tsx Outdated Show resolved Hide resolved
lib/components/Navigation/Breadcrumb/index.tsx Outdated Show resolved Hide resolved
Comment on lines 18 to 22
color: {
primary: "text-foreground",
secondary: "text-secondary-foreground",
tertiary: "text-primary-foreground",
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need these properties? I mean they don't hurt, but we default to using whatever color the container has. I guess if you don't set the property, it will just not add that class and still have this behavior?

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 can get rid of these, but I have 2 icons in the same container with different colors, so that forces me to wrap them and get it a bit dirtier, I'll push it so you can see what I mean.


const Overview = () => (
<div className="grid grid-cols-[2fr_1fr] divide-x divide-y-0 divide-dashed divide-muted">
<AutoGrid tileSize="md" className="col-span-2 pl-10 pr-8 pt-6">
Copy link
Collaborator

Choose a reason for hiding this comment

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

We just recently added a Dashboard component meant for this use case! It just uses AutoGrid but I think it's better for scalability.

Copy link
Collaborator

@josepjaume josepjaume left a comment

Choose a reason for hiding this comment

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

Nearly there! Sorry for the torture haha.

@RamProg
Copy link
Contributor Author

RamProg commented Aug 2, 2024

Nearly there! Sorry for the torture haha.

Don't hesitate to comment, the whole point of this is to agree on solid "foundations" to create a new and better version of Factorial right? So let's work on that, as long as we have the capacity, the better we can build this, the happier we'll be in 2025 and so on.

@josepjaume
Copy link
Collaborator

Don't hesitate to comment, the whole point of this is to agree on solid "foundations" to create a new and better version of Factorial right? So let's work on that, as long as we have the capacity, the better we can build this, the happier we'll be in 2025 and so on.

That's the spirit! You made me cry 😭

@RamProg RamProg enabled auto-merge (squash) August 3, 2024 11:08
@RamProg RamProg requested a review from josepjaume August 5, 2024 08:40
lib/components/Blocks/Header/index.stories.tsx Outdated Show resolved Hide resolved
const Competencies = () => <div>Competencies</div>
const Activity = () => <div>Activity</div>

export const Default: Story = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What would you feel about calling this whole story EmployeeProfile to make it more explicit? Tabs looks too generic to me.

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 was aiming for generic, my reasoning was that the same layout could be reused in a different screen.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I understand! The thing is that this would make sense once we promote this to a component. Then we can find a meaningful name. If it lives in the playground, I think it's probably better to put it a very explicit name just to convey that's an "example".

I mean obviously not a blocker!

Copy link
Collaborator

@josepjaume josepjaume left a comment

Choose a reason for hiding this comment

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

Let's do this!

@RamProg RamProg merged commit 195f44e into main Aug 5, 2024
7 checks passed
@RamProg RamProg deleted the feat/FCT-16897/new-tab-layout branch August 5, 2024 12:43
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