Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add indicator to chat list view about expired messages #2024

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lollerfirst
Copy link

Changes for issue #1995
Added a check that prevents expired notifications from being sent
Added a HBox (maybe it can be styled better) with a yellow background that is shown when there are no messages/offers

…al VBox when there are no messages/offers to be shown
@lollerfirst
Copy link
Author

Sorry I forgot to ask for assignment of this task but since it was a small one I hope I didn't cause annoyance.
I will be requesting the assignment from now on 👍

Copy link
Contributor

@HenrikJannsen HenrikJannsen left a comment

Choose a reason for hiding this comment

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

NACK

@HenrikJannsen
Copy link
Contributor

HenrikJannsen commented Apr 12, 2024

I will add more details to the issue itself to make more clear which approach to use. The style should be less dominant and maybe be similar to the scroll-to-bottom overlay. Maybe @axpoems have some suggestion.

See here the scroll-to-bottom overlay. I think a similar approach from design and behaviour would be better.
Screenshot 2024-04-12 at 12 51 53

@djing-chan djing-chan changed the title For Issue #1995 Add indicator to chat list view about expired messages Apr 12, 2024
@lollerfirst
Copy link
Author

So like something that gets displayed whenever the user reaches the top of the scrolling?

Copy link
Contributor

@axpoems axpoems left a comment

Choose a reason for hiding this comment

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

NACK

I would use the design style for system messages here. This aligns with the suggestion that @HenrikJannsen was making in the issue, which is to add an entry by default at the beginning.

Comment on lines +398 to +400
if (!isApplicationFocussed &&
isReceivedAfterStartUp(chatNotification) &&
!isExpired(chatNotification)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will prevent the system notification to be sent. However, we only send system notifications of messages received while using the app so this seems redundant. Have you tested it?
Also, have you tested that the badge is behaving correctly as well? It shouldn't show the badge number for messages which have expired.

@@ -72,7 +72,7 @@ public final class BisqEasyOfferbookView extends ChatView<BisqEasyOfferbookView,
private DropdownTitleMenuItem atLeastTitle;
private CheckBox hideUserMessagesCheckbox;
private Label channelHeaderIcon, marketPrice, removeWithOffersFilter, removeFavouritesFilter;
private HBox appliedFiltersSection, withOffersDisplayHint, onlyFavouritesDisplayHint;
private HBox appliedFiltersSection, withOffersDisplayHint, onlyFavouritesDisplayHint, expiredMessagesIndicator;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this only added to the offerbook and not in general to all the chats?

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that for private chat messages we do not have an expiry date as its not gossip messages, thus this is not needed. But for common chat messages it should be applied.

@@ -437,10 +439,15 @@ private void addChatBox() {
subheader.getStyleClass().add("offerbook-subheader");
subheader.setAlignment(Pos.CENTER);

Label expiredMessagesIndicatorLabel = new Label(Res.get("bisqEasy.topPane.expiredMessagesIndicator"));
Copy link
Contributor

Choose a reason for hiding this comment

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

I see a gap when there's no label:
image

@lollerfirst lollerfirst marked this pull request as draft April 13, 2024 08:48
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.

None yet

4 participants