Rewrite taxon menu as component-based menu#210
Closed
synrg wants to merge 60 commits into
Closed
Conversation
- Dronefly frequently exceeds Discord's rate limit for edits to uncached messages due to members reacting to uncached messages. - As time passes and a conversation moves on, the value of further reactions on older messages diminish, as many people are no longer paying attention to those messages. - Therefore, this change disables reactions on uncached messages. - This will cause an inconvenience when the bot has been newly restarted, as any interactions started before the reload will no longer respond to reactions after the reload. - This could be remedied in subsequent commits by saving/reloading any unexpired interactions when the cog unloads/loads.
- Taxonomy button can be pressed by known users - Cancel button can be pressed by owner only - No place/user support yet
- Until we resolve cog-specific dependencies (lookup recently active users) these buttons will need to remain in the cog instead of lower down which we'd prefer.
- Only user interaction validation is performed. - No update is made to the display yet.
8 tasks
- Also clarify in utils where defaults read from config (vs. actual config object) are returned.
- Ideally, anything iNatObsQuery does now will migrate fully into core. In the interim, we call prepare_query here for single and multiple observation queries.
- config.user() is supposed to return user config not iNat user!
- in core, TaxonMenu does not have a red ctx, so we need to pass inat_client down as a new parameter when instantiating the menu
- In order to make commands that look up users (e.g. `by username`, etc.) work, we need the user_id() method to succeed when looking up their discord user. Therefore, anywhere should be True by default, not False. - Also added `anywhere` as a parameter so the default can be overridden as needed.
Collaborator
Author
|
Enough of the work has been merged back into devel branch that this PR can now be closed. Unfinished ideas in the checklist should have their own issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR modernizes the taxon menu, bringing it up to the same standards and look-and-feel as our model
,lifeand,taxon listcommands. All menu, source, and formatter concerns are split off and moved down to dronefly-discord and dronefly-core as needed. When complete, it will finally resolve #141 .The commands affected are
,taxonand all of its subcommands and variants (e.g.,imgis included as a taxon command), as well as,taband all of its subcommands, as both sets of commands support social buttons.Concepts
Tasks
taxondisplays (i.e.from,by,by id,not by),tabcommandtabdisplays (same astaxonbut thepercount controlled by buttons differs)