task/WI-454 - DPM Merge into Main#1332
Conversation
- Added citation box and citation modal for publications - Removed Last Modified column on publication listing - Changed Created to Published Date - Added data view modal to view related project information
* WC-332 Add project admin group functionality and related client access checks - Introduced `check_project_admin_group` and `get_project_client` functions to manage project admin access. - Updated various views to utilize the new client access logic for project admins. - Enhanced project metadata handling to include project admin group checks. - Added unit tests for project admin group functionality and client retrieval. * updates to project admin access --------- Co-authored-by: Shayan Khan <skhan@tacc.utexas.edu>
This reverts commit 31349a9.
There was a problem hiding this comment.
This is impressive. I am proud of your work to make this Core-mergable. The _custom/ dir gives Portal opportunity to allow custom code via Dockerfile.12
I worry only about long-term maintenance of CMSWrapper.jsx and cms_ui.html, but Core-Portal v4 likely introduces a change that can retire them.3
Update: I have stricken out my _custom dir thoughts, because another peer review's comment suggests it might be moved to become a standard component.
Footnotes
-
Like how TUP-UI, APCD-CMS, and Texascale-CMS are Core-CMS with custom functionality. ↩ ↩2
-
A Dockerfile is used add/change CMS files (example). @rstijerina, what do you think about a↩TACC/Core-Portal-Template(à la TACC/Core-CMS-Template)? -
Core-Portal v4 UI might be served via the Core-CMS1, so CMS assets and markup would already be present, so no need to load/toggle them ad hoc. ↩
There was a problem hiding this comment.
Explanation: This <CMSWrapper> and cms_ui.html toggle CMS CSS and swap footer HTML1 on the fly. They communicate through custom JavaScript event cms-styles-activated/cms-styles-deactivated. It exists because DPM has pages that mimic CMS UI.
Alternative was serving DPM (or the entire Portal) as app within CMS, which would be too big a scope change just to mimic CMS UI.
Footnotes
-
The footer HTML swap is exactly like
main's header HTML swap. ↩
| shouldTruncateValues ? 'value-truncated' : '' | ||
| }`; | ||
|
|
||
| const compareFn = (entry1, entry2) => { |
There was a problem hiding this comment.
Can we make this more descriptive - what it does and what it's for?
There was a problem hiding this comment.
can we add a docstring on how this is used?
|
|
||
| .root.as-link { | ||
| font-size: inherit; | ||
| font-size: 0.75rem; |
There was a problem hiding this comment.
does this have downstream effects?
There was a problem hiding this comment.
Yes, at least least one — it increases size of text on Move/Copy modal. This change (#986) did fix specific links that were too small (WP-50), but that fix can likely be done without downstream effects.
Why use inherit?
The inherit is meant to make any "button that should look like a link" have style, and font-size, of a link (because a link — an <a> — inherits font-size).
| {label && hasAddon ? <FieldLabel /> : null} | ||
| <FormFieldWrapper type={wrapperType}> | ||
| {label && !hasAddon ? <FieldLabel /> : null} | ||
| {!hasAddon ? <FieldNote /> : null} |
There was a problem hiding this comment.
moved for a particular reason?
| <Button attr="submit" type="primary" onClick={onContinue}> | ||
| Continue | ||
| </Button> | ||
| {/* <Button attr="submit" type="secondary" onClick={onSkip}> |
There was a problem hiding this comment.
Should the commented code in this file be removed? Or uncommented but disabled with flag?
| adv_image = conf_tiff(file) | ||
| else: | ||
| adv_image = conf_raw(value, file) | ||
| except Exception as e: |
There was a problem hiding this comment.
Should we add more explicit exceptions?
| except: | ||
| pass |
There was a problem hiding this comment.
This is a large try/except, what are we trying to check against?
| useTapisToken(); | ||
| // Get the time remaining in the user's session and redirect to the homepage if their | ||
| // browser is open when it expires. | ||
| useRedirectOnSessionExpired({ location: '/' }); |
| "@emotion/react": "^11.13.3", | ||
| "@emotion/styled": "^11.13.0", | ||
| "@mui/material": "^6.1.1", | ||
| "@mui/x-tree-view": "^7.26.0", |
There was a problem hiding this comment.
note as good candidate to replace with new core-components
| numpy = "<2.0" | ||
| matplotlib = "^3.10.0" | ||
| tifffile = "^2025.1.10" | ||
| mysqlclient = "^2.2.7" |
There was a problem hiding this comment.
I think we want to keep all these files, since @jarosenb just added them in a PR a week ago
There was a problem hiding this comment.
It's likely that these projectfile directories are going to need a flag to turn them on and off, since I don't see a way to reconcile them with existing Shared Systems in Core.
There was a problem hiding this comment.
Are we going to attempt to bring publications into other Core Portals as well? If so, this should also have a separate flag to turn on and off.
There was a problem hiding this comment.
Is this still going to be necessary after a merge?
There was a problem hiding this comment.
I think we'll want to decide which of these styles we want to go with, since it will change the portals across the board.
| const sharedWorkspaces = systems.find((e) => e.scheme === 'projects'); | ||
| const isPortalProject = scheme === 'projects'; | ||
| const hideSearchBar = isPortalProject && sharedWorkspaces.hideSearchBar; | ||
| const hideSearchBar = isPortalProject && sharedWorkspaces?.hideSearchBar; |
There was a problem hiding this comment.
Do we have portals without shared workspaces in core?
There was a problem hiding this comment.
For a public view, do we want to allow tapis operations?
fnets
left a comment
There was a problem hiding this comment.
Just went through this again to try and understand it a little more and flagged some questions/changes.
| import { Link } from 'react-router-dom'; | ||
|
|
||
| export default function CMSBreadcrumbs({ breadcrumbs = [] }) { | ||
| /* TODO: Move to …module.css OR into Core-Styles */ |
There was a problem hiding this comment.
This seems like a good opportunity to knock this out.
There was a problem hiding this comment.
Aye. Should move style to Core-Styles x-breadcrumbs.css1, specifically.
Detailed Steps
- Move style to Core-Styles
x-breadcrumbs.css.1 - Release new Core-Styles.
- Delete from Core-CMS.
- Test on CMS.
- Release new Core-CMS.
- Delete from here.
- Test again here.
Wow… this smells like an architecture that is too coupled.
— you
Yes, I know. There is a plan to load Core-Styles better.
— me
Footnotes
| entry.comment.toLowerCase().includes('password') && | ||
| entry.comment.toLowerCase().includes('change') | ||
| const passwordChanged = h.filter((entry) => | ||
| entry.comment.includes('Password changed') |
There was a problem hiding this comment.
I'm not familiar with these functions, but it seems like they will find different sets of entries based on the parameters.
| export async function fetchProjectsListing(queryString) { | ||
| export async function fetchProjectsListing(queryString, rootSystem) { | ||
| const q = queryStringParser.stringify({ query_string: queryString }); | ||
| const url = rootSystem ? `api/projects/${rootSystem}` : `/api/projects/`; |
There was a problem hiding this comment.
Are the portals with shared systems that don't have a root system?
| from portal.apps.projects.workspace_operations.project_meta_operations import (add_file_associations, create_file_obj, get_entity, get_file_obj, get_ordered_value, get_value, patch_entity_and_node, | ||
| patch_file_association, remove_file_obj_by_path) | ||
| from portal.apps.projects.schema_models import constants | ||
| from portal.apps.projects.workspace_operations.graph_operations import get_or_create_trash_entity, get_root_node, get_node_from_path |
There was a problem hiding this comment.
| from portal.apps.projects.workspace_operations.project_meta_operations import (add_file_associations, create_file_obj, get_entity, get_file_obj, get_ordered_value, get_value, patch_entity_and_node, | |
| patch_file_association, remove_file_obj_by_path) | |
| from portal.apps.projects.schema_models import constants | |
| from portal.apps.projects.workspace_operations.graph_operations import get_or_create_trash_entity, get_root_node, get_node_from_path | |
| from portal.apps.projects.workspace_operations.project_meta_operations import (add_file_associations, create_file_obj, get_entity, get_file_obj, get_ordered_value, get_value, patch_entity_and_node, patch_file_association, remove_file_obj_by_path) | |
| from portal.apps.projects.schema_models import constants | |
| from portal.apps.projects.workspace_operations.graph_operations import get_or_create_trash_entity, get_root_node, get_node_from_path |
Overview
DPM features and changes being brought to parity with core.
Related
Changes
DPM Branch: Configuration and Customization Reference for Core Portal
Testing
UI
Notes