Skip to content

Splitter component#1969

Open
MonikaKirkova wants to merge 78 commits intomasterfrom
mkirkova/splitter-component
Open

Splitter component#1969
MonikaKirkova wants to merge 78 commits intomasterfrom
mkirkova/splitter-component

Conversation

@MonikaKirkova
Copy link
Contributor

No description provided.

MonikaKirkova and others added 24 commits November 4, 2025 10:53
@ddaribo ddaribo changed the title Splitter component - POC Splitter component Nov 24, 2025
@ddaribo ddaribo marked this pull request as ready for review February 18, 2026 09:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 toggle public method should have an explicit return type annotation. According to the custom coding guidelines, explicit return types should be specified. Add : void to 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 startCollapsed argType is missing the control property while the endCollapsed argType has it. For consistency, add control: 'boolean' to the startCollapsed argType 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;
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Copilot uses AI. Check for mistakes.
@kacheshmarova
Copy link
Contributor

#1922

@yradoeva

This comment was marked as resolved.

@sdimchevski sdimchevski assigned yradoeva and unassigned sdimchevski Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants