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

New relays section #477

Open
26 of 30 tasks
dtonon opened this issue Aug 25, 2023 · 17 comments
Open
26 of 30 tasks

New relays section #477

dtonon opened this issue Aug 25, 2023 · 17 comments
Labels
In progress The development is started Major feature set UI/UX Related to interface and user experience

Comments

@dtonon
Copy link
Collaborator

dtonon commented Aug 25, 2023

Cloned from #402, now on unstable.

Items marked with 📍 are in my opinion the priorities.


Add a relay

  • A1 - We should check if we can connect to the relay, show if there is a DNS error or any other type of errors, in the latter case the user should still be able to add the relay.
  • A2 - If a host is added without the protocol, let's assume "wss://".
  • A3 - Some invalid hosts (ex. "wss://relay.damus.io." or "wss://.relay.damus.io") pass the check, could be solved by A1.
  • A4 - The error message "That's not a valid relay URL" should be showed inside the modal and not in the sidebar. Not needed because now the check is realtime and disable the "Check" button
  • A5 - After adding a relay instead of filter it by name it should be placed on the top of the list in edit mode, because the user must personalize it.
  • A6 - After adding & enabling a relay (read/write) it does not connect, no activity in the log, I have to restart gossip. Moved: Adding relays not working until restart #499
  • A7 📍 Precompile the input with "wss://"

Edit a relay

  • E1 📍 When editing a relay the list refresh must be stopped.
  • E2 - Light theme: when editing a relay the others' items background should be darker (ex. 50% opacity), like in the dark theme, to focus the edit area. Related to L5.
  • E3 - The action "Remove from personal list" does not works.
  • E4 - Force disconnect should be disabled (gray and without underline) if the relay is not connected.
  • E5 - The action "Force disconnect" does not give any feedback, could be solved by E4.
  • E7 - "Force disconnect" when disabled (gray) is still clickable and close the edit (2023-08-23)

All relays lists

  • L1 📍 Update compact/expand views as proposed.
  • L2 - Add a sort by name (a-z).
  • L3 - Add a sort by add date (newer => older) and set it as a default Moved: Add a sort by add date (newer => older) to relays filter #525
  • L4 - Show the host without the "wss://" protocol (could be added when switching to edit/details).
  • L5 📍 Light theme: items background should be white.
  • L6 - Show a bullet in front off the relay showing the status: green => connected, gray => disconnected; yellow => penalty box (hovering over the mouse shows the remaining time).
  • L7 - Change the rows background to visuals.panel_fill

Active relays view

  • R1 📍 The coverage list should be moved to another view; currently if it is taller than the viewport so it is not possibile to scroll it and view the the actual relays.

I'm not able to check further due to R1.

My relays view

  • M1 📍 Add "Advertise" button.
  • M2 📍 Use blue background for "Advertise" button.
  • M3 📍 Remove the cloned input search

Know network view

  • K1 📍 Add "Hide from the view" near "Force disconnect".

Bootstrap a fresh profile

  • B1 - Hide the "Relays" sub-menu block; when the user click the "Relays" item show "My Relays" view and immediatly open the "Add new relay" modal. With the new Onboarding Wizard #421 we should always have some relay, so this point is not necessary anymore.

Cosmetics

We will move them to a new specific issue.

  • C1 - Revert light theme accent color to the original one.
  • C2 - Review "Add relay" button colors/hover/spacing/font-size.
  • C3 - Review "Close" button font-size.
  • E6 - Make the tooltips less wide to improve readability.

@dtonon
Copy link
Collaborator Author

dtonon commented Aug 25, 2023

@bu5hm4nn I'm checking the current unstable and updated the checklist.

Notes about the updates:
E5 - Closing the modal is ok but would be nice to give a 5 secs delay before the reconnecting, so the user can see the gray icon; currently the reconnecting is immediate and the gray icon is visible < 1s

Notes about not updated:
A1 - Is it easily applicable? Otherwise we can postpone it, the formal checks are more important.
A* - Have these points been addressed somehow? I cannot activate the "That's not a valid relay URL" error message but the host formal check is not still working very well.
E2 - I don't think is a priority anymore; we can review it when we will check how to manage the egui logic and incorporate it in our theme needs.

Added points:
E7

@dtonon
Copy link
Collaborator Author

dtonon commented Aug 25, 2023

For B1 I'm waiting #474 because I cannot test a new profile anymore.

@dtonon
Copy link
Collaborator Author

dtonon commented Aug 25, 2023

The listing view optimization has been moved here: #466

@bu5hm4nn
Copy link
Collaborator

So on A1, I am already doing what @mikedilger suggested which is to parse through the RelayUrl class. So I guess we could make that class stricter on how it parses strings?

The only really good way of validating I see is to try to connect to the relay and check for a successful connection. The reasoning is that if someone uses relays by IP or in a private DNS then validating them against public DNS would not do any good. Also validating against public DNS would not validate the connection port while actually connecting would validate it. And I would always give the user the option of adding it anyways but maybe with a different looking button/link.

We could also try to read the NIP-11 and display it to the user before they finally add the relay.

@dtonon
Copy link
Collaborator Author

dtonon commented Aug 25, 2023

@bu5hm4nn test a successful connection, and maybe use it to fetch NIP-11, is a good option but is more strict, because does not cover the case of an existent relay that is currently offline (but the user should be able to add it anyway).

The DNS idea was just a way to catch misspellings, and as said, I think it can be deprioritized if it is too complicated or not so effective (ex. it hits false positives).

@dtonon dtonon added UI/UX Related to interface and user experience In progress The development is started labels Sep 22, 2023
@dtonon
Copy link
Collaborator Author

dtonon commented Sep 23, 2023

M1 is fixed by #476

@dtonon
Copy link
Collaborator Author

dtonon commented Sep 29, 2023

@mikedilger

Please test unstable and tick A6 if working now.

I started a new profile (export GOSSIP_PROFILE="new") added a relay, it is not active:

image

The log is empty, zero activity.
Restarting the app solve, it became green.

@dtonon
Copy link
Collaborator Author

dtonon commented Sep 29, 2023

@bu5hm4nn on unstable [4944be5] I see a cloned input search:

image

Typing one field fill both.

Added M3 to the list.

@mikedilger
Copy link
Owner

I started a new profile (export GOSSIP_PROFILE="new") added a relay, it is not active:

Did you give gossip a reason to connect to it, like someone you follow that uses it? Why would adding a relay make it go green?

@bu5hm4nn
Copy link
Collaborator

bu5hm4nn commented Oct 2, 2023

I do think it would be good to connect to user-added relays immediately.

  • to confirm it works
  • subscribing with our follow list to see if it has content for any of our followed keys (since many accounts don't publish a 10002)

@dtonon
Copy link
Collaborator Author

dtonon commented Oct 2, 2023

@mikedilger sorry I missed the notification.
I tried to add an user (myself) using only my npub (so no hints).
The user has been added and metadata has been fetched; but the relay is still gray.
How is it possible?

image image image

In the "Known network" now I find all my relays:

image

But I cannot see my notes.

If I restart I see my notes and relay.damus.io is green.

@bu5hm4nn

I do think it would be good to connect to user-added relays immediately.

I agree.

@mikedilger
Copy link
Owner

ok so it is still a bug, and not so easy to find.

@bu5hm4nn
Copy link
Collaborator

bu5hm4nn commented Oct 2, 2023

@mikedilger Item "L3" from the list would require tracking the relay's add date in the db. Should we plan to support that at some point?

@bu5hm4nn
Copy link
Collaborator

bu5hm4nn commented Oct 2, 2023

@bu5hm4nn on unstable [4944be5] I see a cloned input search:
image

Typing one field fill both.

Added M3 to the list.

I think that bug probably came through a manual merge conflict resolution

@dtonon dtonon changed the title New relay section New relays section Oct 3, 2023
@mikedilger
Copy link
Owner

Is this finished? If not, let's mark it for milestone 0.10

@dtonon
Copy link
Collaborator Author

dtonon commented Dec 22, 2023

I revised the checklist: A1, A2, A3 are still open.
There are some cosmetic operations, but we decided to move them to a separate problem (yet to be created).

@dtonon
Copy link
Collaborator Author

dtonon commented Aug 28, 2024

Checklist updated, only A1, A2 and A3 are still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In progress The development is started Major feature set UI/UX Related to interface and user experience
Projects
None yet
Development

No branches or pull requests

3 participants