Skip to content

Table: improve tile mode#2102

Open
fschinkel wants to merge 5 commits intofeatures/fschinkel/26.2/hybrid-manager-dispose-widgetsfrom
features/fschinkel/26.2/configured-tiles
Open

Table: improve tile mode#2102
fschinkel wants to merge 5 commits intofeatures/fschinkel/26.2/hybrid-manager-dispose-widgetsfrom
features/fschinkel/26.2/configured-tiles

Conversation

@fschinkel
Copy link
Copy Markdown
Member

There may not always be a tile for a row. Therefore, implement Table.createTiles more lenient in order to avoid null pointer exceptions. In addition, the TableTileGridMediator ensures that null values removed from its list of tiles.
The list of tiles of the TableTileGridMediator needs to be unique as the tiles will be rendered one after another. If there are duplicates in the list of tiles an 'Already rendered'-error will be thrown if the second occurrence is rendered. Therefore, the TableTileGridMediator removes all duplicates from its list of tiles.

379008

@fschinkel fschinkel requested a review from cguglielmo March 17, 2026 15:53
@fschinkel fschinkel self-assigned this Mar 17, 2026
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/hybrid-manager-dispose-widgets branch from 411586d to c572753 Compare March 18, 2026 10:36
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch from f59e969 to 4d1fb9b Compare March 18, 2026 10:38
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/hybrid-manager-dispose-widgets branch from c572753 to a8d6765 Compare March 23, 2026 05:45
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch from 4d1fb9b to cd9afd0 Compare March 23, 2026 05:49
Copy link
Copy Markdown
Member

@cguglielmo cguglielmo left a comment

Choose a reason for hiding this comment

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

There is a typo in the commit message:

ensures that null values are removed from its list of tiles.

Comment thread eclipse-scout-core/src/table/TableTileGridMediator.ts Outdated
Comment thread eclipse-scout-core/src/table/TableTileGridMediator.ts Outdated
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/hybrid-manager-dispose-widgets branch 2 times, most recently from a2d21ed to c27b01c Compare April 13, 2026 14:09
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch from cd9afd0 to a74a3d8 Compare April 13, 2026 14:13
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/hybrid-manager-dispose-widgets branch from c27b01c to 99847cc Compare April 13, 2026 15:06
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch 2 times, most recently from 5b3cdf8 to ab26bfb Compare April 14, 2026 10:00
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/hybrid-manager-dispose-widgets branch from 1e9ab18 to b040482 Compare April 16, 2026 09:32
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch from e026624 to 5195f7c Compare April 16, 2026 11:09
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/hybrid-manager-dispose-widgets branch 2 times, most recently from 05be66b to 0b202d8 Compare April 16, 2026 11:24
There may not always be a tile for a row. Therefore, implement
Table.createTiles more lenient in order to avoid null pointer
exceptions. In addition, the TableTileGridMediator ensures that null
values removed from its list of tiles.
The list of tiles of the TableTileGridMediator needs to be unique as the
tiles will be rendered one after another. If there are duplicates in the
list of tiles an 'Already rendered'-error will be thrown if the second
occurrence is rendered. Therefore, the TableTileGridMediator removes all
duplicates from its list of tiles.

379008
There may not always be a tile for a row. Therefore, implement
Table.createTiles more lenient in order to avoid null pointer
exceptions. In addition, the TableTileGridMediator ensures that null
values are removed from its list of tiles.
The list of tiles of the TableTileGridMediator needs to be unique as the
tiles will be rendered one after another. If there are duplicates in the
list of tiles an 'Already rendered'-error will be thrown if the second
occurrence is rendered. Therefore, the TableTileGridMediator removes all
duplicates from its list of tiles.

379008
The Scout JS implementation of the sort lookup call for tables in tile
mode uses lookup row icons to indicate whether a selected entry sorts
ascending or descending while the Scout Classic implementation has added
these icons to its text. Align these two implementations and use the
style from Scout JS as it looks cleaner.

379008
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch from 5195f7c to 67aaf56 Compare April 16, 2026 11:42
Add specs and improve several methods.
* addListener() will now refuse to add a listener that is already
  present.
* The type-filter in count() will now match all handlers that are
  triggered. So if a handler was registered for 'lorem ipsum dolor' it
  was not counted if the type-filter was 'lorem'. Now a listener is
  counted if it fulfills all the given types, a listener registered
  with type 'lorem ipsum dolor' will now match e.g. for 'lorem',
  'ipsum dolor' or 'dolor ipsum lorem'.
* the func-filter in count() now also considers the origFunc of a
  listener. If a handler was added using one() the handler is not stored
  in the listeners func property but in origFunc. Therefore, this
  property needs to be checked as well when filtering for a specific
  handler.
* types() will give list of unique single events. So if there are
  handlers registered for 'lorem', 'ipsum' and 'lorem ipsum dolor' the
  former implementation returned
  ['lorem', 'ipsum', 'lorem ipsum dolor']. Now the multi-types are split
  and ['lorem', 'ipsum', 'dolor'] is returned.

379008
Store the registered events in a Map where the single event type a
listener is registered for is the key. So when an event is triggered
not all listeners need to be checked whether they need to be triggered
but only those with the correct types. This gives a huge performance
boost when dealing with huge amounts of listeners and triggered events.
Consider e.g. a hybrid action creating several thousands of widgets.
Typically, there will be a listener for each of these widgets and the
HybridManager will trigger a widgetAdd-event for each of these widgets.
Storing the listeners in an array like the former implementation led to
the array of several thousand listeners being processed for every of the
several thousand widgets which is O(n^2).

379008
@fschinkel fschinkel force-pushed the features/fschinkel/26.2/configured-tiles branch from 67aaf56 to bf0981c Compare April 17, 2026 09:39
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.

2 participants