Open
Conversation
…n for resize controller
feat(splitter): add styles for the splitter
Contributor
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' } },
},
Comment on lines
+148
to
+155
| /** | ||
| * 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."
Contributor
This comment was marked as resolved.
This comment was marked as resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.