Table: improve tile mode#2102
Open
fschinkel wants to merge 5 commits intofeatures/fschinkel/26.2/hybrid-manager-dispose-widgetsfrom
Open
Table: improve tile mode#2102fschinkel wants to merge 5 commits intofeatures/fschinkel/26.2/hybrid-manager-dispose-widgetsfrom
fschinkel wants to merge 5 commits intofeatures/fschinkel/26.2/hybrid-manager-dispose-widgetsfrom
Conversation
411586d to
c572753
Compare
f59e969 to
4d1fb9b
Compare
c572753 to
a8d6765
Compare
4d1fb9b to
cd9afd0
Compare
cguglielmo
reviewed
Mar 31, 2026
Member
cguglielmo
left a comment
There was a problem hiding this comment.
There is a typo in the commit message:
ensures that null values are removed from its list of tiles.
a2d21ed to
c27b01c
Compare
cd9afd0 to
a74a3d8
Compare
c27b01c to
99847cc
Compare
5b3cdf8 to
ab26bfb
Compare
1e9ab18 to
b040482
Compare
e026624 to
5195f7c
Compare
05be66b to
0b202d8
Compare
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
5195f7c to
67aaf56
Compare
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
67aaf56 to
bf0981c
Compare
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.
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