-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/ Consoles - Extract console tabs into components #2189
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs seem to be working for PC/AC/SAC consoles
<ConsoleTabs | ||
defaultActiveTabId="overview" | ||
tabs={[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AC and Reviewer console have updateActiveTabId={setActiveTabId}
set, do we not need this for the other consoles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for AC and reviewer console the activaTabId is required to construct the referrer link so that user can go back to the same tab
for ethics chair console it's fixed to be paper status tab
[Ethics Chair Console](/group?id=${venueId}/${ethicsChairsName}#${submissionName.toLowerCase()}-status)
so i think it's not required
components/webfield/ConsoleTabs.js
Outdated
if (!validTabIds.includes(activeTabId)) { | ||
setActiveTabId(defaultActiveTabId) | ||
updateActiveTabId?.(`#${defaultActiveTabId}`) | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to call updateActiveTabId
here? I think when setActiveTabId
is called it will trigger useEffect again with a valid (default) tab, so the parent's state would already get updated in line 20 with the default. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you are right
this pr does not require change for next upgrade |
this pr should consolidate the tabs and active tab logic to a separate component so that related logic are not duplicated in all consoles and can be better tested