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
Fix #25805: Containers Portlet only show containers from current site #25966
Fix #25805: Containers Portlet only show containers from current site #25966
Conversation
β¦s-from-current-site
β¦s-from-current-site
β¦s-from-current-site
β¦s-from-current-site
β¦t-site' of https://github.com/dotCMS/core into issue-25805-containers-only-show-containers-from-current-site
β¦params on navigation
β¦t-site' of https://github.com/dotCMS/core into issue-25805-containers-only-show-containers-from-current-site
.../apps/dotcms-ui/src/app/portlets/dot-containers/container-list/container-list.component.html
Show resolved
Hide resolved
β¦s-from-current-site
β¦s-from-current-site
β¦s-from-current-site
β¦s-from-current-site
β¦s-from-current-site
SonarQube Quality Gate |
private dotContainersService: DotContainersService | ||
private dotContainersService: DotContainersService, | ||
private paginatorService: PaginatorService, | ||
private dotSiteService: SiteService | ||
) { | ||
super(null); |
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.
([[isEnterprise, hasEnvironments], containers]: [ | ||
[boolean, boolean], | ||
DotContainer[] | ||
]) => { |
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.
This is too complicated, we can make this an object like:
{
isEnterprise: boolean,
hasEnvironments: boolean,
containers: DotContainer[]
}
We might have to modify the resolver... but if you ask me with this approach the resolver is not doing anything.
* @memberof DotContainerListStore | ||
*/ | ||
private patchContainers(containers: DotContainer[]): void { | ||
this.patchState({ |
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.
Why patch instead of set?
</div> | ||
</dot-action-header> | ||
<p-table | ||
*ngIf="vm.tableColumns && vm.actionHeaderOptions" |
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.
Why two conditions here?
dot-portlet-box { | ||
display: flex; | ||
flex-direction: column; | ||
overflow-y: auto; | ||
} |
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.
dot-portlet-box
supposed to work without any modifications... should we make this global?
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
justify-content: space-between; | ||
background: $white; |
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.
Should this be global?
π€ Generated by Copilot at d087b61
Summary
π¨πβ
Refactored the container list component to use the
p-table
component and theDotContainerListStore
service for better UI and performance. Fixed a z-index issue with the content type selector component. Added a method and a test case for resetting extra parameters in the paginator service.Walkthrough
dot-listing-data-table
component withp-table
component for better performance and flexibility (link, link, link, link, link, link, link, link, link, link, link)dot-content-type-selector
component anddiv
with thecontainer-listing__header-options
class to thedot-action-header
component for common header actions (link, link, link)container-list
component styles for the layout and responsiveness of thep-table
component (link, link)DotContainerListStore
service to manage the state and effects of the containers list (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)ElementRef
,QueryList
,ViewChild
,ViewChildren
andMenu
imports for the Angular decorators and types for thecontainer-list
component and thep-table
component (link)InputTextModule
andTableModule
imports for the modules needed for thep-table
component and the query input (link, link, link)ActionHeaderModule
import for the module needed for thedot-action-header
component (link, link)actionsMenu
,tableRows
,selectedContainers
anddestroy$
properties for the references and variables for thecontainer-list
component and thep-table
component (link)handleArchivedFilter
,handleQueryFilter
,loadDataPaginationEvent
,handleActionMenuOpen
andfocusFirstRow
methods for the query filter, the pagination, the action menu and the keyboard navigation for thep-table
component (link)appendTo="body"
attribute to thep-dropdown
element to fix a z-index issue with the dropdown menu (link)resetExtraParams
method to thePaginatorService
class to remove all extra parameters of the eventual request (link, link)DotRouterService
import from thecontainer-list
component since it is no longer needed with theDotContainerListStore
service (link)columnsMock
variable from thecontainer-list
component spec since it is no longer needed with thep-table
component (link)getContainersWithDisabledEntities
method from thecontainer-list
component since it is no longer needed with theDotContainerListStore
service (link)Screenshots
Screen.Recording.2023-09-01.at.1.04.54.PM.mov