Skip to content

Commit b17369a

Browse files
aurreco-ugaCristina AurrecoecheaCopilotbobular
authored
Gene page open all sections (#1578)
* gene page: open all sections in non prod sites * back to not prettied with commas * DRY-up conditional rendering in GeneRecordClasses (#1581) * Initial plan * DRY-up conditional rendering based on NODE_ENV Co-authored-by: bobular <308639+bobular@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bobular <308639+bobular@users.noreply.github.com> --------- Co-authored-by: Cristina Aurrecoechea <aurreco@palm.penn.apidb.org> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: bobular <308639+bobular@users.noreply.github.com>
1 parent 9167f63 commit b17369a

File tree

2 files changed

+40
-23
lines changed

2 files changed

+40
-23
lines changed

packages/libs/wdk-client/src/Views/Records/Record.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
.wdk-RecordMain,
4141
.wdk-RecordSidebar {
42-
padding: 2.5em 0;
42+
padding: 3em 0;
4343
transition: margin-left 250ms ease;
4444
transition: left 250ms ease;
4545
position: relative;

packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/records/GeneRecordClasses.GeneRecordClass.jsx

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -343,29 +343,46 @@ function RecordOverview(props) {
343343
export const RecordMainSection = connect(null)(
344344
({ DefaultComponent, dispatch, ...props }) => {
345345
return (
346-
<React.Fragment>
347-
{props.depth == null && (
348-
<div
349-
style={{
350-
position: 'absolute',
351-
right: 0,
352-
top: '1em',
353-
}}
354-
>
355-
<i className="fa fa-exclamation-triangle" />
356-
&nbsp;
357-
<button
358-
className="link"
359-
onClick={() =>
360-
dispatch(RecordActions.updateAllFieldVisibility(false))
361-
}
346+
<div>
347+
<React.Fragment>
348+
{props.depth == null && (
349+
<div
350+
style={{
351+
position: 'absolute',
352+
right: 0,
353+
top: '1em',
354+
}}
362355
>
363-
Collapse all sections for better performance
364-
</button>
365-
</div>
366-
)}
367-
<DefaultComponent {...props} />
368-
</React.Fragment>
356+
<i className="fa fa-exclamation-triangle" />
357+
&nbsp;
358+
<button
359+
className="link"
360+
onClick={() =>
361+
dispatch(RecordActions.updateAllFieldVisibility(false))
362+
}
363+
>
364+
Collapse all sections for better performance
365+
</button>
366+
{process.env.NODE_ENV !== 'production' && (
367+
<>
368+
<br />
369+
<i className="fa fa-cog" />
370+
&nbsp;
371+
<button
372+
className="link"
373+
onClick={() =>
374+
dispatch(RecordActions.updateAllFieldVisibility(true))
375+
}
376+
>
377+
<strong>Open all sections for testing</strong>
378+
</button>
379+
</>
380+
)}
381+
</div>
382+
)}
383+
<DefaultComponent {...props} />
384+
</React.Fragment>
385+
</div>
369386
);
370387
}
371388
);

0 commit comments

Comments
 (0)