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 library-level enforcement of component field limits #1065

Merged
merged 17 commits into from Apr 18, 2022
Merged

Add library-level enforcement of component field limits #1065

merged 17 commits into from Apr 18, 2022

Conversation

krittick
Copy link
Contributor

Summary

WIP, still needs robust testing

This adds library-level enforcement of limits on component fields, such as min/max values, label/placeholder lengths, and others. This helps reduce the chances of sending invalid data to the API.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, typehinting, examples, ...)

@krittick krittick self-assigned this Feb 21, 2022
# Conflicts:
#	discord/ui/input_text.py
@Lulalaby
Copy link
Member

What's the state of this

@krittick
Copy link
Contributor Author

krittick commented Apr 11, 2022

Working on finishing it up today.

Make that tomorrow, got too busy with work today.

@krittick krittick added this to In progress in v2.0 via automation Apr 13, 2022
@krittick krittick added this to the v2.0 milestone Apr 13, 2022
@krittick krittick marked this pull request as ready for review April 13, 2022 01:29
@krittick krittick enabled auto-merge (squash) April 13, 2022 01:29
@krittick
Copy link
Contributor Author

This is ready for review. Pretty sure I included all of the component limits, but let me know if I missed any.

@krittick krittick added status: awaiting review Awaiting review from a maintainer and removed status: in progress Work in Progess labels Apr 13, 2022
@krittick krittick changed the title [WIP] Add library-level enforcement of component field limits Add library-level enforcement of component field limits Apr 13, 2022
Lulalaby
Lulalaby previously approved these changes Apr 13, 2022
Lulalaby
Lulalaby previously approved these changes Apr 17, 2022
@krittick krittick requested a review from Dorukyum April 17, 2022 23:45
discord/ui/input_text.py Outdated Show resolved Hide resolved
discord/ui/input_text.py Outdated Show resolved Hide resolved
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
@Dorukyum
Copy link
Member

Looks good

@krittick
Copy link
Contributor Author

Looks good

I do know math, I promise. Usually.

@krittick krittick merged commit 87c5a29 into Pycord-Development:master Apr 18, 2022
v2.0 automation moved this from In progress to Done Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer
Projects
No open projects
v2.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants