Skip to content

SED-4496 plan environment selection can never be disabled#1326

Merged
neogucky merged 4 commits into29from
SED-4496-plan-environment-selection-can-never-be-disabled
Feb 5, 2026
Merged

SED-4496 plan environment selection can never be disabled#1326
neogucky merged 4 commits into29from
SED-4496-plan-environment-selection-can-never-be-disabled

Conversation

@neogucky
Copy link
Collaborator

@neogucky neogucky commented Feb 5, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @neogucky, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where plan environment selection parameters could not be effectively cleared or disabled. It introduces a mechanism to filter out undefined execution parameters, ensuring that only active selections are maintained. Additionally, it refines the user interface for setting these parameters by reorganizing explanatory text and updates the core popover component to provide more flexible and consistent positioning.

Highlights

  • Popover Styling Adjustment: Increased the bottom margin for popovers positioned at the bottom-left and bottom-right from 0.5rem to 1rem for improved spacing.
  • Popover Default Vertical Position: Changed the default vertical positioning of popovers from 'above' to 'below' to align with common UI patterns or specific design requirements.
  • Dynamic Popover Positioning: Refactored the popover component to dynamically calculate and apply overlay positions using a new buildPositions method, replacing static position definitions with a more flexible and configurable approach based on xPosition and yPosition inputs.
  • Refactored Target Execution Parameters UI: The 'Set target execution parameters' button's hover popover was removed, and its detailed descriptive text was moved into the associated mat-menu for better contextual display when the menu is open.
  • Parameter Filtering in Plan Editor: Modified the setTargetExecutionParameters method to filter out undefined values from the execution parameters. This ensures that only explicitly set parameters are stored and emitted, effectively allowing parameters to be 'disabled' or cleared.
Changelog
  • projects/step-core/src/lib/modules/basics/components/popover/popover.component.scss
    • Increased margin-bottom for .bottom-left and .bottom-right popover positions from 0.5rem to 1rem.
  • projects/step-core/src/lib/modules/basics/components/popover/popover.component.ts
    • Changed default yPosition input from 'above' to 'below'.
    • Replaced static withPositions array with a new buildPositions method for dynamic overlay positioning.
    • Added buildPositions private method to construct ConnectedPosition[] based on xPosition and yPosition.
  • projects/step-frontend/src/lib/modules/plan-editor/components/plan-editor-actions/plan-editor-actions.component.html
    • Removed step-popover wrapper from the 'sliders' button and added matTooltip directly.
    • Moved detailed explanation for 'Target Execution Parameters' from a popover to inside the mat-menu.
  • projects/step-frontend/src/lib/modules/plan-editor/components/plan-editor-actions/plan-editor-actions.component.ts
    • Modified setTargetExecutionParameters to filter out undefined values from the input parameters before assigning and emitting them.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several improvements. The popover component is refactored to support dynamic positioning, which also fixes a bug with duplicated position definitions. The default position of the popover is also updated. In the plan editor actions, the user experience for setting target execution parameters is enhanced by moving the help text into the action menu. Additionally, a change is made to filter out undefined execution parameters, which seems to address the core issue mentioned in the PR title. My review includes a suggestion to further simplify the new positioning logic and a fix for a typo in a user-facing text.

Comment on lines +147 to +183
private buildPositions(): ConnectedPosition[] {
const isBelow = this.yPosition() === 'below';
const preferLeft = this.xPosition() === 'before';

const buildPosition = (
originY: 'top' | 'bottom',
overlayY: 'top' | 'bottom',
overlayX: 'start' | 'end',
): ConnectedPosition => ({
originX: 'center',
originY,
overlayX,
overlayY,
});

const primary = buildPosition(isBelow ? 'bottom' : 'top', isBelow ? 'top' : 'bottom', preferLeft ? 'end' : 'start');

const secondary = buildPosition(
isBelow ? 'bottom' : 'top',
isBelow ? 'top' : 'bottom',
preferLeft ? 'start' : 'end',
);

const fallbackPrimary = buildPosition(
isBelow ? 'top' : 'bottom',
isBelow ? 'bottom' : 'top',
preferLeft ? 'end' : 'start',
);

const fallbackSecondary = buildPosition(
isBelow ? 'top' : 'bottom',
isBelow ? 'bottom' : 'top',
preferLeft ? 'start' : 'end',
);

return [primary, secondary, fallbackPrimary, fallbackSecondary];
}

Choose a reason for hiding this comment

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

medium

The buildPositions method can be simplified by extracting the repeated conditional logic into variables. This improves readability and maintainability by making the construction of the different position strategies more explicit and less repetitive.

  private buildPositions(): ConnectedPosition[] {
    const isBelow = this.yPosition() === 'below';
    const preferLeft = this.xPosition() === 'before';

    const primaryOriginY = isBelow ? 'bottom' : 'top';
    const primaryOverlayY = isBelow ? 'top' : 'bottom';

    const primaryOverlayX = preferLeft ? 'end' : 'start';
    const secondaryOverlayX = preferLeft ? 'start' : 'end';

    const buildPosition = (
      originY: 'top' | 'bottom',
      overlayY: 'top' | 'bottom',
      overlayX: 'start' | 'end'
    ): ConnectedPosition => ({
      originX: 'center',
      originY,
      overlayX,
      overlayY,
    });

    return [
      buildPosition(primaryOriginY, primaryOverlayY, primaryOverlayX),
      buildPosition(primaryOriginY, primaryOverlayY, secondaryOverlayX),
      buildPosition(primaryOverlayY, primaryOriginY, primaryOverlayX),
      buildPosition(primaryOverlayY, primaryOriginY, secondaryOverlayX),
    ];
  }

…plan-editor-actions/plan-editor-actions.component.html

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@neogucky neogucky merged commit 08ba395 into 29 Feb 5, 2026
@neogucky neogucky deleted the SED-4496-plan-environment-selection-can-never-be-disabled branch February 5, 2026 15:58
neogucky added a commit that referenced this pull request Feb 5, 2026
* SED-4496 Correctly disable plan editor environment when unset

* SED-4496 improved target execution parameters button

* Update projects/step-frontend/src/lib/modules/plan-editor/components/plan-editor-actions/plan-editor-actions.component.html

---------

Co-authored-by: Tim Rasim <2033832+neogucky@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant