Conversation
…n for resize controller
|
We’ve come to a conclusion that the splitter should not support customizable expander and handle slots. This functionality isn’t available in Angular, and I personaly don’t see a clear or practical use case for placing custom content in those areas. |
The slotted content, whatever it is, should be really small to fit the splitter bar. Resizing the bar to accommodate slotted content does not seem an ideal solution either. Probably best to reconsider these slots indeed? |
feat(splitter): add styles for the splitter
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (3)
stories/splitter.stories.ts:175
- There is commented-out code for event listeners. If this code is not needed for the story, it should be removed. If it's meant as an example, consider moving it to a comment or documentation instead.
document.addEventListener('DOMContentLoaded', () => {
// const splitter = document.getElementById(
// 'splitter'
// ) as IgcSplitterComponent;
// splitter.addEventListener('igcResizeStart', (event) =>
// console.log(event.detail)
// );
// splitter.addEventListener('igcResizing', (event) =>
// console.log(event.detail)
// );
// splitter.addEventListener('igcResizeEnd', (event) =>
// console.log(event.detail)
// );
});
src/components/splitter/splitter.ts:449
- The
togglepublic method should have an explicit return type annotation. According to the custom coding guidelines, explicit return types should be specified. Add: voidto match the pattern seen in other components like tree-item.
public toggle(position: 'start' | 'end') {
if (position === 'start') {
this.startCollapsed = !this.startCollapsed;
} else {
this.endCollapsed = !this.endCollapsed;
}
if (!this.startCollapsed || !this.endCollapsed) {
this.updateComplete.then(() => this.requestUpdate());
}
}
stories/splitter.stories.ts:59
- The
startCollapsedargType is missing thecontrolproperty while theendCollapsedargType has it. For consistency, addcontrol: 'boolean'to thestartCollapsedargType configuration.
startCollapsed: {
type: 'boolean',
description: 'Collapses the start pane.',
table: { defaultValue: { summary: 'false' } },
},
| /** | ||
| * Sets whether the user can resize the panels by interacting with the splitter bar. | ||
| * @remarks | ||
| * Default value is `false`. | ||
| * @attr | ||
| */ | ||
| @property({ type: Boolean, attribute: 'disable-collapse', reflect: true }) | ||
| public disableCollapse = false; |
There was a problem hiding this comment.
The documentation for the disableCollapse property states "Sets whether the user can resize the panels", but this property controls collapse functionality, not resize. The description should be corrected to something like "Sets whether the user can collapse the panels by interacting with the splitter bar."



No description provided.