Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

Create / Stylize Explorer-UserDetails Tab component #561

Merged
merged 8 commits into from
Aug 13, 2021

Conversation

henrypalacios
Copy link
Contributor

@henrypalacios henrypalacios commented Aug 3, 2021

closes: #1043

  • Create a new component that uses the Tabs as a Base and style it. (path taken)
    • Use theme Provider variables.
    • Ability to use some variants of the thickness of the tab indicator
    • Add an extra content to Tabs.

@henrypalacios henrypalacios added the Protofire task to the protofire team label Aug 3, 2021
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Looking at the result with the custom theme, doesn't look too far off.

What is the problem you are having?

I have not been able to sync with @biocom yet, but maybe he has any input?

@henrypalacios
Copy link
Contributor Author

@alfetopito I have create another component using Tabs as a base.

My concern is if I have to edit something to achieve in the future to use the space after the tabs for other components (as well as in design)

ExplorerTabs

@fairlighteth
Copy link
Contributor

@henrypalacios I think given we inherit the Tab component here, I think we need to edit the original component. Perhaps by having specifying different 'Tab' types? E.g. normal vs. special purpose. Remind me what was the design we are trying to implement?

@fairlighteth
Copy link
Contributor

Screen Shot 2021-08-04 at 12 40 52

If it's to implement this ^, would the Tab component need to be edited at all? My thinking (correct me if I got the intent wrong):

<>
  <Tabs />
  <Search />
  <Pagination />
  <Filters />
</>

@henrypalacios
Copy link
Contributor Author

Thanks for you point of view @biocom, Looking at your last comment with the drawing of the boxes, you have hit the point.

Following this:

<>
  <Tabs />
  <Search />
  <Pagination />
  <Filters />
</>

I could place the other components next to the tabs (green box), but I'm not sure if I can get the div with the content tab to stay underneath it at 100%. I will give it a try and keep you posted.

@alongoni
Copy link
Contributor

alongoni commented Aug 4, 2021

I think it will work fine! I've made a quick test and looks good:
image
image

@henrypalacios henrypalacios marked this pull request as ready for review August 5, 2021 04:00
justify-content: space-between;
border: 1px dashed darkorange;

.tab-extra-content {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alongoni Maybe you can help me make this work.

width: 100%;

@media ${MEDIA.mobile} {
display: none; /* for now we can hide the extra-content on mobiles */
Copy link
Contributor

Choose a reason for hiding this comment

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

We should work on this in a new PR

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Looking good to me.

Any comments @biocom ?

@fairlighteth
Copy link
Contributor

fairlighteth commented Aug 13, 2021

Looks good based on https://pr561--gpui.review.gnosisdev.com/storybook/?path=/story/explorerapp-explorertabs--default-tabs

One comment is, what happens for mobile/responsive. E.g. the search/filters and tabs would need a solution for that.

One idea is to turn the tabs into a select list/dropdown for mobile. Then column wrap all the items. Example https://ant.design/components/tabs/

Another idea is to only have these items:

  • Sticky 'dropdown/select menu' on top (when scrolling).
  • Sticky/fixed FILTER button at the bottom -> On click opens search/filtering options (similar to what you see on e-commerce websites).

This would prioritize the initial order details on mobile, and only show the filters on request. I'd be in favor of the latter idea.

@henrypalacios
Copy link
Contributor Author

Due to last comment, what do you suggest @alfetopito?
Should we keep it here or should I create another PR for this?

@alfetopito
Copy link
Contributor

Due to last comment, what do you suggest @alfetopito?
Should we keep it here or should I create another PR for this?

New PR. Since the desktop version is good to go, I'll merge it.

@alfetopito alfetopito merged commit e531d92 into develop Aug 13, 2021
@alfetopito alfetopito deleted the styling-tab-1043 branch August 13, 2021 16:56
@alfetopito alfetopito mentioned this pull request Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Protofire task to the protofire team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants