Skip to content

Conversation

@pfalcon
Copy link
Contributor

@pfalcon pfalcon commented Mar 8, 2025

Previously, the widget showed security name, and attribute name/date below it. Now, we start with showing attribute name, followed by date, and list all securities having the same attribute name and date. This saves vertical space, and clearly groups all securities having the same date attribute.

Previously, the widget showed security name, and attribute name/date below
it. Now, we start with showing attribute name, followed by date, and
list all securities having the same attribute name and date. This saves
vertical space, and clearly groups all securities having the same date
attribute.
@pfalcon
Copy link
Contributor Author

pfalcon commented Mar 8, 2025

Related discussion: #3927 (comment)

Screenshot before

followup-before

Screenshot after

followup-after

Comment on lines +153 to +154
this.lastDate = item.date;
this.lastAttrType = item.type;
Copy link
Member

Choose a reason for hiding this comment

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

In your example, if there is a refresh, wouldn't it show no headline at all?
There are two items that are collated into one. In the next rundown the "lastDate" and "lastAttrType" match also the first one.

I propose to not use a member variable. For reasons of simplicity, I added a "previous" item to the method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In your example, if there is a refresh, wouldn't it show no headline at all?

Yeah, apparently it required to override update() method to re-initialize those vars.

I propose to not use a member variable.

Sure, if there's an easy way to avoid storing state, it's good idea. Thanks for the refactor!

@buchen
Copy link
Member

buchen commented Mar 9, 2025

merged.

@buchen buchen closed this Mar 9, 2025
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