Skip to content

feat(ui5-input-table-suggest): introduce new InputTableSuggest component - #13678

Open
ndeshev wants to merge 41 commits into
mainfrom
input-tabular-suggestions-alt
Open

feat(ui5-input-table-suggest): introduce new InputTableSuggest component#13678
ndeshev wants to merge 41 commits into
mainfrom
input-tabular-suggestions-alt

Conversation

@ndeshev

@ndeshev ndeshev commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

JIRA: BGSOFUIRILA-4203

Related to #13666

Overview

This branch introduces a significant refactoring of the ui5-input component architecture by extracting a base class (InputField) and creating a new InputTableSuggest component
for tabular suggestions.

Architecture Changes

Before:
ui5-input (All functionality mixed)

After:
InputField (Core input functionality) ← New private base class
├── ui5-input (List-based suggestions)
└── ui5-input-table-suggest (Table suggestions)

New Files

  • InputField.ts - Private base class with core input functionality
  • InputFieldTemplate.tsx - Base template with hook system for extensibility
  • InputField.css - Base styles extracted from Input.css
  • InputTableSuggest.ts - New component for tabular suggestions
  • InputTableSuggestTemplate.tsx - Template for tabular suggestions popover
  • InputTableSuggestPopoverTemplate.tsx - Popover template with Table component

InputField (Base Class)

Contains all non-suggestion-related functionality:

  • Properties: value, placeholder, disabled, readonly, required, type, valueState, maxlength, showClearIcon, accessibility properties
  • Slots: icon, valueStateMessage
  • Events: change, input, select
  • Features: Form integration, value state handling, IME composition, clear icon, accessibility, resize handling

ui5-input (Extends InputField)

Adds list-based suggestions:

  • Properties: showSuggestions, highlight, noTypeahead, filter
  • Slots: suggestionItems (SuggestionItem/SuggestionItemGroup)
  • Events: selection-change, type-ahead, suggestion-scroll, open, close
  • Uses InputSuggestions feature for suggestion handling

ui5-input-table-suggest (Extends InputField) - NEW

Adds tabular suggestions (like SAPUI5's sap.m.Input with tabular suggestions):

  • Properties: showSuggestions, noTypeahead, open
  • Slots: suggestionColumns (TableHeaderCell), suggestionRows (TableRow)
  • Events: selection-change, type-ahead, open, close
  • Displays suggestions in a Table with multiple columns
  • Supports typeahead from first column only
  • Uses automatic popin mode for responsive behavior

Key Design Decisions

  1. InputField is private - not intended for direct use, only through subclasses
  2. Clean separation - suggestion logic completely removed from base class
  3. Shared value state handling - both subclasses inherit value state popover
  4. Independent suggestion implementations - ui5-input uses List, InputTableSuggest uses Table
  5. Styles inheritance - subclasses extend InputField.styles array

Migration Impact

  • No breaking changes for ui5-input consumers
  • New ui5-input-table-suggest component available for tabular suggestion use cases
  • Internal refactoring only; public API preserved

ndeshev added 2 commits June 10, 2026 08:46
This POC uses ui5-table rendering instead of a native one

JIRA: BGSOFUIRILA-4203

related to #13666
@ndeshev
ndeshev temporarily deployed to netlify-preview June 11, 2026 08:10 — with GitHub Actions Inactive
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

major refactoring and improvements, added tests
@ndeshev
ndeshev temporarily deployed to netlify-preview July 8, 2026 14:12 — with GitHub Actions Inactive
minor fixes, value state functionality implementation
@ndeshev
ndeshev temporarily deployed to netlify-preview July 10, 2026 14:22 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 13, 2026 07:19 — with GitHub Actions Inactive
@ndeshev ndeshev changed the title feat(ui5-tabular-input): introduce new tabular suggestions input (wip) feat(ui5-tabular-input): introduce new tabular suggestions input Jul 13, 2026
@ndeshev
ndeshev marked this pull request as ready for review July 13, 2026 07:20
@ndeshev
ndeshev temporarily deployed to netlify-preview July 14, 2026 05:37 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 14, 2026 06:15 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 14, 2026 11:56 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 15, 2026 12:42 — with GitHub Actions Inactive
@nikoletavnv
nikoletavnv self-requested a review July 16, 2026 09:19
@nikoletavnv

Copy link
Copy Markdown
Contributor

The input border disappears once the focus goes to table row but the mouse hovers the input field

image

@nikoletavnv

Copy link
Copy Markdown
Contributor

Announcing the selected row differs from OpenUI5 table suggestions. In the other application when going through the items, first the number of the row is announced with some other information. After the value column is announced, the rest of the columns and their values for the selected row are also announced.
At the moment in this PR - only the selected value is announced without extra columns information

Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/InputTableSuggestPopoverTemplate.tsx
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
@nikoletavnv

Copy link
Copy Markdown
Contributor

Highlighting of the input text is trimming spaces. The original text in the second column is "Widget Alpha" but when bolded it is "WidgetAlpha":

image

Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/test/pages/InputTableSuggest.html
Comment thread packages/main/test/pages/InputTableSuggest.html Outdated
Comment thread packages/main/test/pages/TabularInput.html Outdated
Comment thread packages/main/test/pages/InputTableSuggest.html
@ndeshev
ndeshev marked this pull request as draft July 24, 2026 13:46
refactor ui-input to ui5-input-field and ui5-input for list suggestions functionality,
ui5-input-table-suggest now extends ui5-input-field to avoid inheriting redundant logic
@ndeshev
ndeshev force-pushed the input-tabular-suggestions-alt branch from fbd4d49 to 366d4a4 Compare July 30, 2026 09:22
@ndeshev
ndeshev temporarily deployed to netlify-preview July 30, 2026 09:27 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 30, 2026 16:58 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 31, 2026 04:34 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview August 2, 2026 05:06 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview August 4, 2026 07:17 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview August 4, 2026 09:37 — with GitHub Actions Inactive
Comment thread packages/main/src/InputTableSuggest.ts Outdated
Comment thread packages/main/test/pages/InputTableSuggest.html Outdated
Comment thread packages/main/src/InputTableSuggest.ts Outdated
Comment thread packages/main/src/InputTableSuggest.ts Outdated
Comment thread packages/main/src/InputTableSuggest.ts Outdated
Comment thread packages/main/src/InputTableSuggest.ts Outdated
@ndeshev
ndeshev temporarily deployed to netlify-preview August 10, 2026 10:12 — with GitHub Actions Inactive
@ndeshev
ndeshev marked this pull request as ready for review August 10, 2026 10:13
…ent- #13678

fix template inheritance and css structure and imports
@ndeshev
ndeshev deployed to netlify-preview August 12, 2026 18:02 — with GitHub Actions Active
@ndeshev
ndeshev deployed to netlify-preview August 12, 2026 18:03 — with GitHub Actions Active
@@ -0,0 +1,69 @@
:host([focused]:not([_row-focused])) .ui5-input-focusable-element::after {
content: var(--ui5_input_focus_pseudo_element_content);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

that variable as well as many others are defines in Input-parameters. css which is not correct. As a next step we have to properly define all the variables and parameters

* @public
*/
@property({ type: Boolean })
open = false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Currently, when a character is typed in the input field, the suggestion picker is open, no matter whether that character matches a suggestion or not. In UI5 as well as in list suggestions case, the picker is open only when the value matches a suggestion

}

_afterClosePicker() {
this.fireDecoratorEvent("close");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When value is deleted (empty) the picker remains open which is not the case with list suggestions and tabular suggestions in UI5

@niyap niyap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. If you type something and move the focus in the suggestions list, then continue typing something -> the visual focus remains over the suggestion where it is expected to be in the input field
  2. I think that it will be nice to adjust one of the samples for the playground to be easier to hit the popin mode.

const input = document.getElementById("employee-input");

function updateSuggestions(filterValue) {
while (input.querySelector("[slot='suggestionRows']")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't it better to query the DOM just once, something like:
input.querySelectorAll("[slot='suggestionRows']").forEach(el => el.remove());

</div>

<div class="section">
<ui5-title class="section-title" level="H2">Popin Overflow Mode (Default)</ui5-title>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can remove "Default" as it is the only currently supported mode

</p>

<div style="display: flex; flex-direction: column; gap: 1rem;">
<ui5-input-table-suggest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add show-suggestion as they are currently defined but not show. The same is valid for the other value states in that sample as well

<ui5-input-table-suggest
id="informationMessage"
placeholder="Information with message..."
value-state="Information"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

again show-suggestions is missed

<ui5-input-table-suggest
id="formattedNegative"
placeholder="Error with formatted message..."
value-state="Negative"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

show-suggestions

<ui5-input-table-suggest
id="formattedCritical"
placeholder="Warning with formatted message..."
value-state="Critical"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

show-suggestions

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.

3 participants