Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b6c41caf44 | |||
b858b3b9e2 |
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-06-26 - 1.0.100 - fix(wcc-dashboard)
|
||||||
|
Prevent duplicate application of scroll positions in dashboard to avoid interfering with user scrolling
|
||||||
|
|
||||||
|
- Added a private 'scrollPositionsApplied' property to track if scroll positions have already been applied
|
||||||
|
- Introduced a guard in the applyScrollPositions method to ensure the scroll state is applied only once
|
||||||
|
|
||||||
## 2025-06-26 - 1.0.99 - fix(dashboard)
|
## 2025-06-26 - 1.0.99 - fix(dashboard)
|
||||||
Fix scroll state preservation in dashboard by tracking frame and sidebar scroll positions and updating the URL accordingly.
|
Fix scroll state preservation in dashboard by tracking frame and sidebar scroll positions and updating the URL accordingly.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-wcctools",
|
"name": "@design.estate/dees-wcctools",
|
||||||
"version": "1.0.99",
|
"version": "1.0.100",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
|
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-wcctools',
|
name: '@design.estate/dees-wcctools',
|
||||||
version: '1.0.99',
|
version: '1.0.100',
|
||||||
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
|
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,8 @@ export class WccDashboard extends DeesElement {
|
|||||||
@property()
|
@property()
|
||||||
public sidebarScrollY: number = 0;
|
public sidebarScrollY: number = 0;
|
||||||
|
|
||||||
|
private scrollPositionsApplied: boolean = false;
|
||||||
|
|
||||||
@queryAsync('wcc-frame')
|
@queryAsync('wcc-frame')
|
||||||
public wccFrame: Promise<WccFrame>;
|
public wccFrame: Promise<WccFrame>;
|
||||||
|
|
||||||
@ -268,6 +270,11 @@ export class WccDashboard extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async applyScrollPositions() {
|
public async applyScrollPositions() {
|
||||||
|
// Only apply scroll positions once to avoid interfering with user scrolling
|
||||||
|
if (this.scrollPositionsApplied) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const wccFrame = await this.wccFrame;
|
const wccFrame = await this.wccFrame;
|
||||||
const wccSidebar = this.shadowRoot.querySelector('wcc-sidebar');
|
const wccSidebar = this.shadowRoot.querySelector('wcc-sidebar');
|
||||||
|
|
||||||
@ -280,5 +287,7 @@ export class WccDashboard extends DeesElement {
|
|||||||
// The sidebar element itself is the scrollable container
|
// The sidebar element itself is the scrollable container
|
||||||
wccSidebar.scrollTop = this.sidebarScrollY;
|
wccSidebar.scrollTop = this.sidebarScrollY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.scrollPositionsApplied = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user