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

Implement default level selection #573

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

DimK19
Copy link
Contributor

@DimK19 DimK19 commented Aug 8, 2023

This is a feature requested by issue #348, under "Approved Features". The purpose is to have a quick and permanent way of switching between the two most commonly used level numbers, 100 and 50. I placed the radio buttons for this selection in the central column:

Screenshot
image

It may not be exactly a property of the field, but this position indicates that it applies to both parties. Additionally, I have made the radio group gen-specific to all generations from 4 and onwards, since before that there were not any game formats played at level 50 as far as I am aware.

The default value when the page loads is 100. Upon changing it, the two input fields of the levels are updated and the stats recalculated accordingly. When changing to another set from the drop-down list, priority is given to the predetermined level of that set, meaning 100 for ou, uu, etc, 50 for battle spot etc, 5 for lc, and so on, and not the default level indicated by the radio button. This is done so as to not interfere and tamper with the saved sets. When a "Blank Set" is selected, then its level will be the chosen default level. Your input on this last decision would be appreciated, because even though I think this is the most logical approach, it may confuse some users.

Please let me know if any changes must be made. Thanks.

@shrianshChari
Copy link
Contributor

I just have a couple of suggestions. First, I'd include an option for level 5 for Little Cup builders. Second, make it so that when someone hovers over the button, it'll say "Blank sets will be level 100/50/5" so that people are aware that only the blank sets get affected.

@DimK19
Copy link
Contributor Author

DimK19 commented Aug 17, 2023

make it so that when someone hovers over the button, it'll say "Blank sets will be level 100/50/5" so that people are aware that only the blank sets get affected.

@shrianshChari In the screenshot I have attached, if I were to click Level 50, the levels would instantly change to 50, even though the selected sets are not blank. The limitation on blank sets is applied when changing a set from the list. Perhaps it would be simpler to impose the selected level universally on all sets, overriding the level of the saved sets. I suppose that should be decided by the maintainers.

include an option for level 5 for Little Cup builders

Certainly I could add this, are there any other levels that should be included?

@shrianshChari
Copy link
Contributor

shrianshChari commented Oct 5, 2023

Perhaps it would be simpler to impose the selected level universally on all sets, overriding the level of the saved sets. I suppose that should be decided by the maintainers.

I do like this since it's simpler; if you do so then create a selection that just leaves the levels as they are for the sets.

Are there any other levels that should be included?

I think most metagames just follow levels 100, 50, and 5. If we need more levels in the future, then we can just add them.

Edit: I also think that this should apply to all gens since there are also LC metagames for gens 1-3.

@thejetou
Copy link
Collaborator

thejetou commented Oct 5, 2023

I'd prefer for saved sets to override the default selection. Otherwise, if Level 100 is automatically picked then VGC/BSS sets wouldn't work. I suppose you could have a "None" button, but generally I think saved sets should override calc settings.

Also, some sets use Level 99 or Level 49 so clicking that button would mess up those sets.

@DimK19
Copy link
Contributor Author

DimK19 commented Oct 5, 2023

@thejetou As it is now, saved sets will override the default level selection when initially chosen in the calculator (as per your preference) but if the user clicks a different default level afterwards, the level of both sets will change accordingly. For example if I have set the default level to 100 and choose from the drop-down list a saved set with level 99, then it will have level 99 (ignoring the default), but if then I click level 50, both active sets will have their levels changed to 50, regardless of whether they are saved or not. I think this approach provides ease of use (not having to scroll down to the blank set) without excessively tampering with the saved sets.

Practically the user who is interested in a level-100 format may never need the functionality (as sets are level 100 by default unless otherwise specified – in which case their level is preserved), and the user who is interested in a level-50 format can choose any two sets from the list and then bring them down to level 50 with a single click.

The other option is, as you said, to have a "None" option, with which all sets have their predetermined level, and then I suppose if a default level were selected it should override everything. Please let me know if this would be preferable!

@DimK19
Copy link
Contributor Author

DimK19 commented Oct 5, 2023

@thejetou After @shrianshChari 's suggestion, I have added a third option for level 5. Apparently there are level 5 formats in all generations. Below are two screenshots:

image
Generations 1-3
image
Generations 4 and on

As I have mentioned, I have made the option for level 50 generation-specific to the 4th and onwards, as I did not find any formats prior to that played at level 50. Of course I could change that specification if necessary.

Thanks.

@thejetou
Copy link
Collaborator

thejetou commented Oct 5, 2023

This should be ready for merge once the merge conflicts are fixed.

@shrianshChari
Copy link
Contributor

Personally, I still feel having a "None" or "Default" button is good, since it gives the user a visual that the level selector is not active. Then, you would just have the level selector default to "None" and the level would override every set. However, I also think that we could do some user testing (if we wanted to do that) since we won't know which UX is better without testing. Ultimately, jetou has the final say on the merge.

@thejetou
Copy link
Collaborator

thejetou commented Oct 6, 2023

Personally, I still feel having a "None" or "Default" button is good, since it gives the user a visual that the level selector is not active. Then, you would just have the level selector default to "None" and the level would override every set. However, I also think that we could do some user testing (if we wanted to do that) since we won't know which UX is better without testing. Ultimately, jetou has the final say on the merge.

The thing is that a level selector is always active (level 100), so having None and Level 100 is kind of redundant IMO. Other than the rare case where you have a Level 60 Pokemon then you click the level 50 selector and would like to back to Level 60 but I'm not confident that this case warrants a button - if it's desired by users later down the line I'll add it in but it doesn't seem worth it for now in my perspective.

@DimK19
Copy link
Contributor Author

DimK19 commented Oct 6, 2023

This should be ready for merge once the merge conflicts are fixed.

The merge conflict should be resolved now.

@thejetou thejetou merged commit 06c7409 into smogon:master Oct 6, 2023
2 checks passed
@thejetou
Copy link
Collaborator

thejetou commented Oct 6, 2023

Great work. Thank you!

@thejetou thejetou linked an issue Oct 6, 2023 that may be closed by this pull request
ForwardFeed pushed a commit to ForwardFeed/damage-calc that referenced this pull request Oct 28, 2023
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.

No option for pokemon staying level 50
3 participants