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

Better Better Server Browser (somewhat) #645

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

Conversation

AlphaGaming7780
Copy link

@AlphaGaming7780 AlphaGaming7780 commented May 31, 2023

Better Server Browser

The goal of this PR, as the name suggests, is to revamp the server browser.

I recommend merging this PR before mine: #624

Interesting thing to know:

  • The scroll bar (for the server details) automatically hides and appears as needed.
  • The search entry automatically resizes its width to fit the text inside the label.
    Before:
    image
    image
    After :
    image
    image
  • Now, if you left-click on the Server description or required mod, you can scroll up and down to navigate through the displayed text, if it's possible.

Need an opinion:

  • Should I add a menu to bookmark servers, since bookmarking is planned? It might be better.
  • Should I save the filters applied by the player, so that they are preserved when the game is relaunched?
  • Which menu should appear first when a player selects a server: its description or the required mods?
  • Should I add a setting in the mod settings to let the player choose which menu they want to see first (description/required mods)?

TODO

  • Disabled mods are not counted as missing. To reproduce this bug, disable a mod that is required by a server. It will still appear in the installed mods list. [1.1.0]
  • Add a scroll bar to the description + required mod list. [1.2.0] + [1.2.1]
  • Add favourites ? No, Can't save data. But do I have to make the UI for this ? No one answered so marked as finished
  • I still need to clean up the code by removing all the comments I added or unnecessary thing, if you agree. [1.3.0]
  • Fixed the search label width [1.4.0]

Video and other stuff

Below, you will find a video showcasing the changes made. The video is made using V1.1.0

titanfall2-20230531-20384810_C8j9Umhp.mp4

You can also download this mod (V1.7.0), which does the same thing. (https://northstar.thunderstore.io/package/TritonSupreme/BetterServerBrowser/)

@F1F7Y F1F7Y changed the title Better Server Browser Better Better Server Browser (somewhat) Jun 2, 2023
Fixed a bug with the map selection menu scroll bar
Now, if you left-click on the Server description or required mod, you can scroll up and down to navigate through the displayed text, if it's possible.
@F1F7Y
Copy link
Member

F1F7Y commented Jun 26, 2023

Personally I would find it better if you PRed your fixes separately

Also I remember @uniboi said he was also working on improvements to the server browser

@AlphaGaming7780
Copy link
Author

The only changes I made that are not auditions are:

  • Enlarging the "Join" button to occupy the entire width of the menu containing server details.
  • Making the text input for searching servers by name resize based on the size of the adjacent label.

I don't think these two small changes deserve a pull request on their own, as these two issues only seem to occur (I believe) for non-English localizations.

"DefaultValue": "0"
},
{
"Name": "filter_map",
Copy link
Member

Choose a reason for hiding this comment

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

Unintentional indentation change? Like only default value was changed but more stuff shows up in diff

Copy link
Author

Choose a reason for hiding this comment

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

Is this an issue that I need to fix, or is it just a remark ?
And no, I don't see why GitHub considers every line as replaced instead of modified.
Also, my indentations are done with tabs and a size of 4.

Copy link
Member

Choose a reason for hiding this comment

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

That's an issue that should be resolved. Forgot I could just use web version of vscode to check diff. Anyway looks likes it caused by replacing tabs with spaces:

image

Copy link
Author

Choose a reason for hiding this comment

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

Okay It's fixed

@GeckoEidechse
Copy link
Member

GeckoEidechse commented Jun 26, 2023

I don't think these two small changes deserve a pull request on their own, as these two issues only seem to occur (I believe) for non-English localizations.

The thing with making multiple smaller PRs is that it means that these smaller changes are not blocked by some issue in the other parts of the code. As splitting up a PR is kinda annoying as the person submitting it, my personal approach when I submit a bigger PR is to have one big PR with all the changes and then making new smaller PRs with some of those changes that can be added independently.

Then when the smaller changes are merged, I update the original big PR to be up-to-date with main and once a bunch of the smaller changes are merged, the diff of the big PR gets smaller and smaller until there's only one logical change left ^^

This way smaller stuff gets merged faster but I still got one big "batteries included" PR that showcases all of the changes.

@AlphaGaming7780
Copy link
Author

AlphaGaming7780 commented Jun 27, 2023

I can split my PR into smaller PRs if you insist, but let me know what you want me to PR.
Here's a list of the changes and their dependencies:

Change the map select button and method
Change the Gamemode select button and method
Change the size of the join Button
Make the Search entry auto resize to fit the label next to it
UI reorganization

New Filters
New Server details Panels

The 2 buttons + text + scrollbar

I'm not sure what this file is for.
I had added that line of code at the beginning because `MenuMapSelect_Init()` was there, and I was using this menu as a reference to create the map select menu for the server browser.
However, after testing, I found that the menu works perfectly fine without that line, so I decided to remove it.
@uniboi
Copy link
Contributor

uniboi commented Jun 27, 2023

Also I remember @uniboi said he was also working on improvements to the server browser

yes I'm working on a complete rewrite of the server browser

@F1F7Y
Copy link
Member

F1F7Y commented Jul 9, 2023

I can split my PR into smaller PRs if you insist, but let me know what you want me to PR. Here's a list of the changes and their dependencies:

Each fix/feature should preferably be its own PR

@GeckoEidechse
Copy link
Member

I can split my PR into smaller PRs if you insist, but let me know what you want me to PR. Here's a list of the changes and their dependencies:

Each fix/feature should preferably be its own PR

The easiest way to do this btw, is to just branch off of this branch, then remove all the changes except the one you want to PR, PR that, and then revert merge conflicts on this PR here once the other one is merged.

Rinse and repeat (and maybe even parallelise) and by the end everything should be merged ^^

@AlphaGaming7780
Copy link
Author

I have been on vacation for about 2 weeks and I have 1 week left, so I am unable to work on this at the moment.

@ASpoonPlaysGames ASpoonPlaysGames added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code feedback wanted Feedback is wanted whether the changes by this PR are desired labels Sep 2, 2023
@GeckoEidechse
Copy link
Member

Thanks for @Zanieon for bumping this PR and putting it back on my radar <3

Anyway, to increase the chances of this being merged I highly recommend making smaller PRs for some of the fixes. This way we can get parts of this merged faster than having to go through the whole thing all at once which tends to scare people away from reviewing/testing ^^"

@github-actions github-actions bot added merge conflicts Blocked by merge conflicts, waiting on the author to resolve and removed merge conflicts Blocked by merge conflicts, waiting on the author to resolve labels Jul 29, 2024
@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Nov 21, 2024
@Zanieon Zanieon marked this pull request as draft November 27, 2024 12:33
@Zanieon
Copy link
Contributor

Zanieon commented Nov 27, 2024

Drafting this until PR actually go anywhere (conflicts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback wanted Feedback is wanted whether the changes by this PR are desired merge conflicts Blocked by merge conflicts, waiting on the author to resolve needs code review Changes from PR still need to be reviewed in code needs testing Changes from the PR still need to be tested
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

6 participants