-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] Unified DA search and file downloads for PreCAWG public data release #458
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
Conversation
Renamed tissue filter lists for rats and humans, added 'aorta' to rat tissues, and removed 'IPE' from rat acute timepoints. Introduced new filter lists for species, intervention effects, and assays (gene, protein, metabolite), with sorting applied to assay lists for improved usability.
Deleted the tissueListRatAcute array from searchFilters.jsx as it is no longer needed or used in the codebase.
Introduced a sub-hero section and modal to highlight the availability of a new human dataset. Updated button labels and link destinations in the highlighted links container for improved clarity and navigation.
Standardized spacing and units throughout the landingPage.scss file, improved readability of gradient and box-shadow definitions, and added new styles for a sub-hero section and modal. Adjusted margins, font sizes, and button styles for consistency across breakpoints. Enhanced modal appearance with a gradient background and updated section-specific styles for better visual hierarchy.
Replaces plain MoTrPAC text with an external link, updates 'Browse Data' to 'Browse Results', and adds a working external link for Data Visualization. Improves clarity and navigation for users accessing new data collections.
Updated the 'Browse Results' and 'Citation' links to use absolute paths, ensuring correct navigation to the intended pages.
Simplifies and updates the dashboard UI for external users, replacing the reviewer-specific welcome and data download section with a general announcement about new human dataset availability and improved guidance for all external users. Removes the reviewer agreement modal and download buttons, focusing on public data release information and navigation links.
Reformatted complex background-image properties for improved readability and maintainability. Added a specific font size for h1 in .alert-data-release.external-user, and standardized font-size and transition-delay values for consistency.
Revised titles and descriptions for feature links to improve clarity and reflect updated study details, including endurance training in young adult rats and acute exercise in human sedentary adults. Enhanced consistency and specificity across data download, results browsing, and visualization links.
Introduces new SCSS rules to style external links within the header navbar dropdown, ensuring icons are properly aligned and spaced.
Rearranged navigation items for improved clarity and user experience. Split 'Browse Data' and 'Data Visualization' into separate dropdowns, updated menu labels, and added external link icons for relevant items. Moved 'Data Updates Signup' to the 'Resources' dropdown and adjusted conditional rendering for internal users.
A new external link to request assistance has been added to the footer, improving user access to support resources.
Changed the JSON formatting in announcements.json to use a more compact array and object style, reducing whitespace and improving readability. No content or data was modified.
Introduces a new exported studyList array containing filter values and labels for different studies. This enables consistent use of study filters across the application.
Reworked logic for customizing tissue and study filters based on selected studies and user type. Updated filter lists to use unified tissue and assay sources, improved handling of filter rendering, and added support for species tags. Adjusted prop types and filter mapping for better maintainability and clarity.
Merged human and rat tissue filters into a single 'tissues' array with species property. Updated geneCentricSearchFilters to use the unified list. Added defaultOmeList and optionalOmeList exports for omics and assay filter options.
Unified and simplified result table prop types and column definitions for search results across omics types. Removed legacy and redundant table configurations, updated default props and prop types, and streamlined data transformation logic to use new unified fields.
Modified handleSearch to adjust 'study' parameter based on userType, including or excluding 'pass1a06' accordingly. Updated filter reset logic, added 'must_not' filters for certain assays, and changed searchSuccess to accept params. Cleaned up unused code and improved parameter handling for search actions.
Updated searchParams to support multiple studies and omics as arrays, removed unused fields (species, comparison_group, contrast1_timepoint), and adjusted filter handling logic to accommodate study selection. Reduced default result size, updated field lists, and improved SEARCH_SUCCESS and SEARCH_RESET cases to align with new filter structure.
Replaces study-specific results tables with a unified SearchResultsTable, simplifies search input handling, and updates options and placeholders to support searching across multiple studies. Removes redundant components and logic, and updates prop types and search parameter management for improved maintainability and user experience.
Introduces the SearchResultsTable React component, which renders a paginated, sortable, and downloadable results table using react-table. The component dynamically selects columns based on search parameters and supports gene, metabolite, and protein result types.
Introduced the 'filter_ome' property to relevant entries in defaultOmeList and optionalOmeList to explicitly associate assays with their respective omics categories. This enhances filtering and categorization capabilities for downstream usage.
Introduces a new ome filter section with buttons that route filter values to either 'omics' or 'assay' parameters based on filter configuration. The new UI logic also handles toggling associated omics filters when an assay filter is selected, and disables buttons with no results.
Included 'omics' in the unique_fields array and updated filter selection logic to handle both 'study' and 'omics' fields. This allows filtering and unique value extraction for the 'omics' field in search functionality.
Improves logic for updating the omics filter when selecting or deselecting assay filters. Now, omics are only added if not already present and only removed if no other assays with the same omics remain selected.
Deleted the construction of a must_not filter for certain assay types in handleSearch, as it is no longer used in the request parameters.
Introduced a must_not filter under the filters property in defaultSearchState to exclude specific assay types from search results.
Introduced a switch to include or exclude optional epigenomics filters in the ome filter panel. Optional filters are now disabled unless the 'Include Epigenomics' toggle is enabled, improving user control over filter visibility and selection.
Introduces the TOGGLE_EPIGENOMICS action and its creator for managing epigenomics toggling. Updates default search parameters to include contrast_type and must_not filters for specific assays. Also fixes the handleSearch function to use the correct params in the axios POST request.
Removed the specific 'react-hooks/exhaustive-deps' rule from the eslint-disable-next-line comment in useEffect, making it a general eslint-disable-next-line. This may allow for broader linting exceptions in this block.
Inserted a list item indicating that release notes are coming soon and commented out the conditional rendering of the release notes link in the dataDownloadsMain.jsx component.
Eliminates the inputError state and related logic from SearchResultFilters. The update button is now only disabled during auto-searching, and input error notifications are no longer displayed.
Replaces double quotes with HTML entities in the acknowledgement text to ensure proper rendering on the citation page.
Deleted the 'Update results' button and its associated event handler from the search result filter controls. This streamlines the UI, possibly in favor of auto-search or other interaction changes.
The unique_fields property was removed from both searchParamsDefaultProps and searchParamsPropType as it is no longer used.
Eliminated the unique_fields and hasResultFilters properties from the default search state and reducer logic, as they are no longer used. This simplifies the state structure and reduces unnecessary code.
Eliminated the hasResultFilters prop and its PropTypes definition from SearchPage as it is no longer used in the component or passed to children.
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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/Search/searchReducer.js (1)
83-131:⚠️ Potential issue | 🟠 MajorAvoid mutating
searchParams.study/omicsarrays in-place.
paramsis a shallow copy, sopushmutates state arrays and can break Redux immutability.🛠️ Safe immutable update
- if (action.field.match(/^(study|omics)$/)) { - const isActiveParam = params[action.field].indexOf(action.filterValue); - if (isActiveParam === -1) { - // Adds filter if new - params[action.field].push(action.filterValue); - } else { - // Removes filter if already exists - const newArr = params[action.field].filter( - (value) => !(value === action.filterValue) - ); - params[action.field] = newArr; - } - } + if (action.field.match(/^(study|omics)$/)) { + const currentValues = Array.isArray(params[action.field]) + ? [...params[action.field]] + : []; + const isActiveParam = currentValues.indexOf(action.filterValue); + if (isActiveParam === -1) { + currentValues.push(action.filterValue); + } else { + currentValues.splice(isActiveParam, 1); + } + params[action.field] = currentValues; + }src/Search/searchPage.jsx (1)
144-159:⚠️ Potential issue | 🟡 MinorGuard against empty/invalid manual input matches.
match(...)can returnnull(e.g., only commas/spaces) and.mapwill throw.✅ Safe fallback
- const terms = inputStr.match(/("[^"]+"|[^, ]+)/g); - // Remove double quotes from terms that are enclosed and trim any extra spaces - return terms.map((term) => term.replace(/"/g, '').trim()); + const terms = inputStr.match(/("[^"]+"|[^, ]+)/g); + if (!terms) return []; + // Remove double quotes from terms that are enclosed and trim any extra spaces + return terms.map((term) => term.replace(/"/g, '').trim());
🤖 Fix all issues with AI agents
In `@src/Search/deaSearchResultFilters.jsx`:
- Around line 38-97: The buttonFilterFingerprint currently omits the
includeEpigenomics toggle so toggling it doesn't change the fingerprint and
won't trigger the useEffect that calls handleSearch; update the fingerprint
object (the variable buttonFilterFingerprint) to include the includeEpigenomics
value from searchParams (e.g. searchParams.includeEpigenomics || false) so the
useEffect dependency sees the change and triggers the debounced handleSearch;
ensure any comparisons using previousFingerprintRef.current still work with the
expanded fingerprint shape.
In `@src/Search/searchPage.jsx`:
- Around line 125-134: The placeholder strings in renderPlaceholder still imply
comma/quote parsing; update the examples to single-term, simple examples without
commas or quotation marks (modify the strings returned in function
renderPlaceholder based on searchParams.ktype). For 'protein' replace the long
comma/quoted list with a few single-entry examples like "atpase inhibitor
mitochondrial" or "vegfa"; for 'metab' use single-term/metabolite examples like
"amino acids", "c10:2 carnitine"; and for the default return use simple gene
symbols like "bag3", "myom2" without commas or quotes so the UI no longer
suggests special parsing. Ensure the changed strings are used in the existing
renderPlaceholder function and referenced by searchParams.ktype.
In `@src/Search/searchReducer.js`:
- Around line 252-287: In the TOGGLE_EPIGENOMICS case of the searchReducer,
reset pagination so toggling epigenomics doesn't leave the user on an
out-of-range page: set the searchParams start index to 0 (e.g., params.start =
0) and, if you use a nested pagination object, also clear
params.pagination.start = 0 before returning the updated state; keep the rest of
the existing logic that updates params.filters, newFilters.must_not, and
includeEpigenomics.
🧹 Nitpick comments (3)
src/BrowseDataPage/components/dataDownloadsMain.jsx (1)
159-162: Consider extracting repeated userType checks for clarity.The pattern
!userType || (userType && userType === 'external')appears twice (lines 160-162, 199-201), and the internal check at line 196 uses inline ternary logic. Extracting these to variables at the top of the component would improve readability and reduce duplication.♻️ Suggested refactor
const dispatch = useDispatch(); const location = useLocation(); // anonymous user or authenticated user const userType = profile.user_metadata && profile.user_metadata.userType; + const isInternalUser = userType === 'internal'; + const isExternalAccess = !userType || userType === 'external';Then use
isExternalAccessforcssSelectorandisInternalUserfor conditional logic:- cssSelector={ - !userType || (userType && userType === 'external') - ? 'external-access' - : '' - } + cssSelector={isExternalAccess ? 'external-access' : ''}- dataSelectHandler={() => userType && userType === 'internal' ? dispatch(actions.selectHumanPreCovidSedAduData()) : dispatch(actions.selectHumanPreCovidSedAduExternalData())} + dataSelectHandler={() => isInternalUser ? dispatch(actions.selectHumanPreCovidSedAduData()) : dispatch(actions.selectHumanPreCovidSedAduExternalData())}Also applies to: 196-201
src/Citation/citationPage.jsx (1)
58-61: Consider capitalizing “Pre‑Suspension” for consistency.
Keeps the label aligned with the PR terminology and other UI surfaces.💡 Suggested tweak
- <h5 className="mt-4">Acute exercise in human sedentary adults (pre-suspension)</h5> + <h5 className="mt-4">Acute exercise in human sedentary adults (Pre-Suspension)</h5>src/Search/searchReducer.js (1)
1-54: Use the EPIGENOMICS_ASSAYS constant for default exclusions to avoid drift.Right now the default/reset
must_not.assayvalues duplicate the constant. Keeping them in sync is easy to miss.♻️ Suggested change (apply in default and both reset blocks)
- must_not: { - assay: ['epigen-atac-seq', 'epigen-rrbs', 'epigen-methylcap-seq'], - }, + must_not: { + assay: [...EPIGENOMICS_ASSAYS], + },Also applies to: 210-245
Deleted the rollupOptions.manualChunks setting that split 'vis-network' and 'vis-data' into a separate chunk. This simplifies the build output and relies on Vite's default chunking behavior.
Simplified and shortened the example placeholder text for protein and metabolite search types to improve clarity and readability.
Sets params.start to 0 when filters are updated to ensure search results start from the first page after filter changes.
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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/Search/searchReducer.js (1)
108-118:⚠️ Potential issue | 🔴 CriticalSame state mutation issue with filter arrays.
newFiltersis a shallow copy ofparams.filters, sonewFilters[action.field]is still the original array reference. The.push()call mutates state directly.🐛 Proposed fix
// Handle selection of a filter value if (action.field.match(/^(tissue|assay|sex|timepoint)$/)) { + const currentFilterArray = newFilters[action.field] || []; if (isActiveFilter === -1) { - // Adds filter if new - newFilters[action.field].push(action.filterValue); + newFilters[action.field] = [...currentFilterArray, action.filterValue]; } else { - // Removes filter if already exists - const newArr = newFilters[action.field].filter( - (value) => !(value === action.filterValue) + newFilters[action.field] = currentFilterArray.filter( + (value) => value !== action.filterValue ); - newFilters[action.field] = newArr; } }
🤖 Fix all issues with AI agents
In `@src/Search/searchPage.jsx`:
- Around line 696-697: toggleEpigenomics is declared in SearchPage.propTypes as
.isRequired but a default value is provided in SearchPage.defaultProps (making
it effectively optional); fix by either removing toggleEpigenomics from
SearchPage.defaultProps so it truly is required, or make it optional by removing
.isRequired from SearchPage.propTypes; update the
SearchPage.propTypes/SearchPage.defaultProps entries (reference symbols:
toggleEpigenomics, SearchPage.propTypes, SearchPage.defaultProps) accordingly.
- Around line 137-139: The DOM queries for inputEl and inputElManual run during
render and can be null; move the queries into a post-mount context or replace
them with refs: either (a) wrap document.querySelector('.rbt-input-main') and
document.querySelector('.search-input-ktype') inside a useEffect that runs after
mount and store the elements in state/refs, or (b) attach a React ref (reuse
inputRef for the Typeahead input and add a new ref for the manual input) and
read ref.current where needed; update all usages of inputEl and inputElManual to
use the new refs or the values populated inside useEffect so you never call
document.querySelector during render.
In `@src/Search/searchReducer.js`:
- Around line 93-104: The reducer mutates nested state by calling .push() on
params[action.field] (params is a shallow copy of state.searchParams), so
replace the in-place mutation with an immutable update: create a new array when
adding (e.g., newArr = [...params[action.field], action.filterValue]) and assign
it to params[action.field], and when removing use filter to produce a new array
(you already do this for removal); update the reducer code paths that reference
params, state.searchParams, action.field, and action.filterValue to always
assign newly created arrays rather than mutating existing ones.
🧹 Nitpick comments (4)
src/Search/searchReducer.js (1)
14-16: DRY: Use theEPIGENOMICS_ASSAYSconstant instead of hardcoding.The assay list is defined as a constant at line 15 but then hardcoded again at lines 35-36, 220, and 243. If updated in one place, the others could be missed.
♻️ Proposed fix
contrast_type: ['exercise_with_controls', 'acute'], must_not: { - assay: ['epigen-atac-seq', 'epigen-rrbs', 'epigen-methylcap-seq'], + assay: [...EPIGENOMICS_ASSAYS], },Apply similarly at lines 219-221 and 242-244.
Also applies to: 34-36
src/Search/searchPage.jsx (3)
286-294: Avoid repeated calls togetFriendlyErrorMessagewith the same args.The function is called three times with identical arguments. Store the result once:
♻️ Proposed fix
{!searching && searchError ? ( + (() => { + const errorInfo = getFriendlyErrorMessage(searchError, scope); + return ( <div className="alert alert-danger"> <strong> <i className="bi bi-exclamation-triangle-fill mr-2" /> Search Error </strong> - <p className="mb-0 mt-2">{getFriendlyErrorMessage(searchError, scope).friendlyMessage}</p> - {getFriendlyErrorMessage(searchError, scope).suggestion && ( - <p className="mb-0 mt-1 small">{getFriendlyErrorMessage(searchError, scope).suggestion}</p> + <p className="mb-0 mt-2">{errorInfo.friendlyMessage}</p> + {errorInfo.suggestion && ( + <p className="mb-0 mt-1 small">{errorInfo.suggestion}</p> )} </div> + ); + })() ) : null}Or extract to a small component / helper variable before the return.
392-394: Guard againstundefinedfortotalcomparison.
totalcan beundefinedper PropTypes (no.isRequired). Thetotal === 0check is truthy only for exactly0, but explicit handling improves clarity.♻️ Suggested tweak
- const isExpectedEmpty = !error || total === 0 || isNoResultsError(error) || isFilterMismatchError(error); + const isExpectedEmpty = !error || (typeof total === 'number' && total === 0) || isNoResultsError(error) || isFilterMismatchError(error);
89-93: Consider movingmergeAndDedupeByIdoutside the component.This pure helper doesn't depend on component state or props. Extracting it avoids re-creating the function on every render.
♻️ Proposed refactor
+// Helper to concatenate arrays of objects and remove duplicates by 'id' property +function mergeAndDedupeById(...arrays) { + const combined = arrays.flat(); + return [...new Map(combined.map((item) => [item.id, item])).values()]; +} + export function SearchPage({ ... - // Helper to concatenate arrays of objects and remove duplicates by 'id' property - function mergeAndDedupeById(...arrays) { - const combined = arrays.flat(); - return [...new Map(combined.map((item) => [item.id, item])).values()]; - }
Replaced direct DOM queries for input elements with usage of the Typeahead ref for value access and clearing. Simplified input transformation and clearing logic, and removed unnecessary props and code related to manual input element selection.
Updated the logic for adding and removing filters in SearchReducer to use immutable array and object updates. This ensures state is not mutated directly, improving reliability and maintainability.
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/Search/searchPage.jsx`:
- Around line 147-154: Guard against match() returning null by checking the
matched result before calling .map; inside the block where you compute
inputValue (using inputRef.current?.getInput()?.value) assign the result of
inputValue.match(...) to a variable like terms, then if (!terms) return [] (or
an appropriate empty array/result) otherwise return terms.map(term =>
term.replace(/"/g, '').trim()); this ensures code paths using the terms variable
(in the same scope where inputRef and getInput are used) never call .map on
null.
🧹 Nitpick comments (1)
src/Search/searchPage.jsx (1)
89-123: MemoizegetOptionsto avoid re-merging large datasets every render.This runs on each render and can be expensive with big lists. Consider caching by
ktype, study selection, anduserType.♻️ Suggested refactor
- function getOptions() { - if ((includesPass1b06 && includesPrecawg && includesPass1a06) || (userType && userType === 'internal')) { - switch (searchParams.ktype) { - case 'gene': - return mergeAndDedupeById(genes, ratAcuteGenes, humanGenes); - case 'metab': - return mergeAndDedupeById(metabolites, ratAcuteMetabolites, humanMetabolites); - case 'protein': - return mergeAndDedupeById(proteins, ratAcuteProteins, humanProteins); - default: - return []; - } - } - if ((includesPass1b06 && includesPrecawg) || (!userType || userType === 'external')) { - switch (searchParams.ktype) { - case 'gene': - return mergeAndDedupeById(genes, humanGenes); - case 'metab': - return mergeAndDedupeById(metabolites, humanMetabolites); - case 'protein': - return mergeAndDedupeById(proteins, humanProteins); - default: - return []; - } - } - return []; - } + const options = useMemo(() => { + if ((includesPass1b06 && includesPrecawg && includesPass1a06) || (userType && userType === 'internal')) { + switch (searchParams.ktype) { + case 'gene': + return mergeAndDedupeById(genes, ratAcuteGenes, humanGenes); + case 'metab': + return mergeAndDedupeById(metabolites, ratAcuteMetabolites, humanMetabolites); + case 'protein': + return mergeAndDedupeById(proteins, ratAcuteProteins, humanProteins); + default: + return []; + } + } + if ((includesPass1b06 && includesPrecawg) || (!userType || userType === 'external')) { + switch (searchParams.ktype) { + case 'gene': + return mergeAndDedupeById(genes, humanGenes); + case 'metab': + return mergeAndDedupeById(metabolites, humanMetabolites); + case 'protein': + return mergeAndDedupeById(proteins, humanProteins); + default: + return []; + } + } + return []; + }, [includesPass1b06, includesPrecawg, includesPass1a06, userType, searchParams.ktype]);Then update:
- options={getOptions()} + options={options}As per coding guidelines: Performance optimizations are considered, especially for large data sets or complex computations.
Added a check to return an empty array if no terms are matched in the input, preventing errors when parsing search terms.
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/Search/searchPage.jsx`:
- Around line 285-306: The checks mistakenly reference searchResults.data (which
doesn't exist) causing them to always be truthy; update the conditional
expressions that currently use !searchResults.data to use
!searchResults.result.data instead (in the block rendering the alert and the
subsequent block that checks total), keeping the other conditions (searching,
searchResults.errors, searchResults.total === 0, scope) intact so that
isFilterMismatchError, getFriendlyErrorMessage, searchResults, and scope logic
behave as intended.
🧹 Nitpick comments (3)
src/Search/searchPage.jsx (3)
89-93: Consider hoistingmergeAndDedupeByIdoutside the component.This pure function doesn't depend on any props/state and gets recreated on every render. Moving it to module scope eliminates unnecessary allocations.
♻️ Suggested refactor
+// Helper to concatenate arrays of objects and remove duplicates by 'id' property +function mergeAndDedupeById(...arrays) { + const combined = arrays.flat(); + return [...new Map(combined.map((item) => [item.id, item])).values()]; +} + export function SearchPage({ ... }) { - // Helper to concatenate arrays of objects and remove duplicates by 'id' property - function mergeAndDedupeById(...arrays) { - const combined = arrays.flat(); - return [...new Map(combined.map((item) => [item.id, item])).values()]; - }
164-173: Pagination handler works correctly.Minor optimization: wrap in
useCallbackto avoid recreating the function on each render, especially since it's passed as a prop toSearchResultsTable.♻️ Optional: memoize with useCallback
- const handlePaginationChange = ({ size: newSize, start: newStart }) => { + const handlePaginationChange = useCallback(({ size: newSize, start: newStart }) => { const updatedParams = { ...searchParams, size: newSize, start: newStart, }; handleSearch(updatedParams, searchParams.keys, 'filters', userType); - }; + }, [searchParams, handleSearch, userType]);
274-283: RepeatedgetFriendlyErrorMessagecalls.Calling the function multiple times with identical arguments in the same render is wasteful. Store the result once.
♻️ Suggested refactor
{!searching && searchError ? ( + (() => { + const errorInfo = getFriendlyErrorMessage(searchError, scope); + return ( <div className="alert alert-danger"> <strong> <i className="bi bi-exclamation-triangle-fill mr-2" /> Search Error </strong> - <p className="mb-0 mt-2">{getFriendlyErrorMessage(searchError, scope).friendlyMessage}</p> - {getFriendlyErrorMessage(searchError, scope).suggestion && ( - <p className="mb-0 mt-1 small">{getFriendlyErrorMessage(searchError, scope).suggestion}</p> + <p className="mb-0 mt-2">{errorInfo.friendlyMessage}</p> + {errorInfo.suggestion && ( + <p className="mb-0 mt-1 small">{errorInfo.suggestion}</p> )} </div> + ); + })() ) : null}Or extract to a small
<ErrorAlert />component for cleaner JSX.
Updated references from searchResults.data to searchResults.result?.data to correctly handle the nested result object structure. This prevents errors when checking for search results and displaying alerts.
Introduced a callout box prompting users to subscribe for notifications about future data updates related to the acute exercise in human sedentary adults study. The callout includes a link to a Google Form for subscription.
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/BrowseDataPage/components/dataDownloadsMain.jsx`:
- Around line 193-203: SelectiveDataDownloadsCard uses a different predicate for
styling than for selecting data: dataSelectHandler treats any non-'internal'
userType as external, but cssSelector only marks ''external-access'' for
undefined or explicit 'external'. Change the cssSelector to the same logic as
dataSelectHandler (i.e., treat any userType !== 'internal' or missing userType
as external) so the card gets external-access styling whenever it will dispatch
the external action; update the cssSelector prop on the
SelectiveDataDownloadsCard instance that currently references userType to mirror
the dispatch predicate.
Replace placeholder and conditional env-based link with a hardcoded CloudFront PDF URL and update the link label. Removed the "Release notes coming soon" placeholder and the import.meta.env check, now showing a direct "Data Release Notes" link to the release PDF so users can access the notes immediately.
Introduce a new "Acute Exercise" content block (id="acute-exercise") to overview.jsx with detailed text, figure, and Download/Browse action links; add anchor links for the two sedentary-adult intervention list items to jump to the new section. Standardize button copy across the page to "Download Datasets" and "Browse Results". Add small SCSS rules for .figure-caption .material-icons to adjust icon size and alignment. These changes provide anchorable documentation for the acute-exercise cohort and improve UI consistency.
Render study-specific headings in CodeRepositories when componentName is 'QC' or 'Analysis'. Adds an "Endurance Training in Young Adult Rats" header above the repo list and an "Acute Exercise in Human Sed Adults" header with a "Coming Soon" note after the list. Uses existing utility classes (font-weight-bold, border-bottom, mt-4) to match layout.
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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/MainStudy/overview.jsx`:
- Around line 212-215: The img element showing src
"motrpac-human-precovid-sed-adu-study-overview.png" has incorrect alt text
copied from the endurance section; update the alt on that img in
MainStudy/overview.jsx to an accurate, accessible description such as "Acute
Exercise Study Overview — Pre‑COVID sedentary adult study" (or similar concise
phrase) so the alt reflects the acute exercise figure.
- Around line 198-202: Fix the missing space in the paragraph text inside
src/MainStudy/overview.jsx by updating the string that currently reads
"period.Biological" to "period. Biological" (look for the JSX paragraph block in
the MainStudy overview component that contains the sentence "On the main test
day, participants arrived after an overnight fast and then completed their
assigned exercise or rest period.Biological samples...").
🧹 Nitpick comments (1)
src/BrowseDataPage/components/dataDownloadsMain.jsx (1)
196-196: Consider extracting the data select handler for readability.The inline ternary in the callback is dense and harder to scan at a glance. A small refactor could improve clarity.
♻️ Optional refactor
+ const handleHumanSedAduDataSelect = () => { + if (userType === 'internal') { + dispatch(actions.selectHumanPreCovidSedAduData()); + } else { + dispatch(actions.selectHumanPreCovidSedAduExternalData()); + } + }; + // Then in JSX: - dataSelectHandler={() => userType && userType === 'internal' ? dispatch(actions.selectHumanPreCovidSedAduData()) : dispatch(actions.selectHumanPreCovidSedAduExternalData())} + dataSelectHandler={handleHumanSedAduDataSelect}
Replace the literal apostrophe in the ProjectOverview paragraph with the HTML entity ' to ensure proper escaping/rendering in the JSX content.
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/MainStudy/overview.jsx`:
- Around line 207-211: The DOM id "project-overview-experiment-design" is
duplicated; change the acute/first block's id to a unique value (e.g.
"project-overview-experiment-design-acute") in the JSX where the <div
className="study-figure ..."> is defined and update any matching collapse
controls (buttons/anchors using data-bs-target, href, or aria-controls that
reference "#project-overview-experiment-design") to reference the new id; ensure
the endurance section keeps its original id so collapse toggles affect the
correct element.
Fix minor copy/formatting and improve semantics/accessibility in the study overview component: add missing space after a period, rename the figure element ID to reflect the acute exercise figure, and update the image alt text to a more descriptive string for clarity and accessibility.
jyu-sm
left a comment
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.
looking good.
This pull request primarily refactors the differential abundance (DA) results search and file download features in support of the PreCAWG public data release. It also include UI changes for the announcement of the data release on the homepage, external users' dashboard page, as well as the public accessible announcement page.
Important Notes regarding this PR
Key Changes
Unified DA search
Gene-centric view
File download
Top Nav
Footer
Homepage
External Users' Dashboard page (upon login)
Announcements page
Summary by CodeRabbit
New Features
UI/UX Improvements
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.