Skip to content

feat: add <ConcealableTabs /> - #6073

Merged
UncleBill merged 2 commits into
developfrom
feat/new-tab-style
Apr 19, 2022
Merged

feat: add <ConcealableTabs />#6073
UncleBill merged 2 commits into
developfrom
feat/new-tab-style

Conversation

@UncleBill

@UncleBill UncleBill commented Apr 13, 2022

Copy link
Copy Markdown
Contributor

closes https://mask.atlassian.net/browse/MF-329

Use the tail prop

                    <ConcealableTabs<string>
                        tabs={tabs}
                        selectedId={selectedTabId}
                        onChange={setSelectedTab}
                        tail={
                            <Box display="flex" justifyContent="center" alignItems="center" height="35px" width="35px">
                                <GearSettingsIcon />
                            </Box>
                        }
                    />

image

Scrolling detect

image

image

The controllers can auto update

image

@UncleBill
UncleBill requested review from guanbinrui, hanszhoou and nuanyang233 and removed request for guanbinrui and hanszhoou April 13, 2022 05:41
Comment thread packages/mask/src/components/InjectedComponents/PageTab.tsx Outdated
@UncleBill
UncleBill force-pushed the feat/new-tab-style branch from a768c5f to 5a838a7 Compare April 13, 2022 05:43
@UncleBill
UncleBill force-pushed the feat/new-tab-style branch 5 times, most recently from 5c75512 to b34eca2 Compare April 13, 2022 05:58
@github-actions

github-actions Bot commented Apr 13, 2022

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request April 13, 2022 06:05 Inactive
Comment thread packages/mask/src/components/InjectedComponents/ProfileTabContent.tsx Outdated
@github-actions
github-actions Bot temporarily deployed to pull request April 13, 2022 06:22 Inactive
Comment thread packages/shared/src/UI/components/ConcealableTabs/index.tsx Outdated
@github-actions
github-actions Bot temporarily deployed to pull request April 13, 2022 07:19 Inactive
guanbinrui
guanbinrui previously approved these changes Apr 13, 2022
@github-actions
github-actions Bot temporarily deployed to pull request April 13, 2022 08:40 Inactive
@UncleBill UncleBill changed the title feat: add <ConcealTabs /> feat: add < ConcealableTabs /> Apr 14, 2022
@guanbinrui guanbinrui changed the title feat: add < ConcealableTabs /> feat: add <ConcealableTabs /> Apr 15, 2022
guanbinrui
guanbinrui previously approved these changes Apr 15, 2022
@UncleBill

Copy link
Copy Markdown
Contributor Author

@DimensionDev/qa Please help to verify.

@github-actions
github-actions Bot temporarily deployed to pull request April 17, 2022 02:38 Inactive
@UncleBill
UncleBill force-pushed the feat/new-tab-style branch from 77b1be6 to cf78de7 Compare April 18, 2022 02:56
@github-actions
github-actions Bot temporarily deployed to pull request April 18, 2022 03:01 Inactive
@UncleBill
UncleBill force-pushed the feat/new-tab-style branch from cf78de7 to 84bd1a4 Compare April 18, 2022 05:47
@github-actions
github-actions Bot temporarily deployed to pull request April 18, 2022 05:53 Inactive
Comment on lines +152 to +154
if (selectedId === undefined && tabs.length) {
onChange?.(tabs[0].id)
}

@septs septs Apr 18, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (selectedId === undefined && tabs.length) {
onChange?.(tabs[0].id)
}
if (!selectedId || !tabs?.[0]?.id) return
onChange?.(tabs[0].id)

}
}, [selectedId === undefined, tabs.length > 0, onChange])

const slide = useCallback((toLeft: boolean) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const slide = useCallback((toLeft: boolean) => {
const setSlide = useCallback((toLeft: boolean) => {

@UncleBill
UncleBill merged commit 2f7f460 into develop Apr 19, 2022
@UncleBill
UncleBill deleted the feat/new-tab-style branch April 19, 2022 10:03
yanzhihong23 added a commit that referenced this pull request Apr 24, 2022
* develop: (143 commits)
  feat: tips entrance (#6012)
  refactor: remove unused plugin entries
  chore: patch @solana/web3.js (#6125)
  New translations en-US.json (Quenya) (#6131)
  New translations en-US.json (Quenya) (#6126)
  feat: new intial persona page (#6122)
  chore: turn on fortmatic (#6127)
  fix: if phantom is locked, might not able to open its popup (#6115)
  fix: reduce jsx nested (#6124)
  fix: duplicate render by unique key (#6123)
  docs(i18n): sync i18n files from Crowdin (#6119)
  feat: manage recent pending transactions (#6055)
  chore: add conflux config (#6112)
  fix: type error (#6113)
  feat: improve mask popup (#5986)
  feat: new app board (#6018)
  fix(tip): set significant to 6 for formatting max amount (#6062)
  fix: ITO history default icon (#6078)
  feat: add <ConcealableTabs /> (#6073)
  fix: if gulp biuld-ci fails, ci should fail as well (#6107)
  ...
yanzhihong23 added a commit that referenced this pull request Apr 24, 2022
* develop: (94 commits)
  fix: mnemonic words exports (#6136)
  feat: tips entrance (#6012)
  refactor: remove unused plugin entries
  chore: patch @solana/web3.js (#6125)
  New translations en-US.json (Quenya) (#6131)
  New translations en-US.json (Quenya) (#6126)
  feat: new intial persona page (#6122)
  chore: turn on fortmatic (#6127)
  fix: if phantom is locked, might not able to open its popup (#6115)
  fix: reduce jsx nested (#6124)
  fix: duplicate render by unique key (#6123)
  docs(i18n): sync i18n files from Crowdin (#6119)
  feat: manage recent pending transactions (#6055)
  chore: add conflux config (#6112)
  fix: type error (#6113)
  feat: improve mask popup (#5986)
  feat: new app board (#6018)
  fix(tip): set significant to 6 for formatting max amount (#6062)
  fix: ITO history default icon (#6078)
  feat: add <ConcealableTabs /> (#6073)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants