refactor: rework how item.view is determined#2981
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/2981/head:pr-2981
git checkout pr-2981This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/2981/head |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors how ViewItem.view is determined by removing direct view reference propagation in favor of a parent-based traversal approach. Previously, every item held a direct reference to the view that was passed and updated across items, which broke in the cv2 rewrite. Now, items only track their immediate parent and recursively traverse the parent chain to find the view when needed.
Key changes:
- Replaced direct
item._viewassignments with parent-only tracking across all container types - Implemented recursive view resolution through the parent chain in
ViewItem.viewproperty - Deprecated manual
.viewsetter with warning for removal in v2.8
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| discord/ui/view.py | Removed direct _view assignment in add_item, updated remove_item to use identity check and clear parent, fixed clear_items to properly clear parent references |
| discord/ui/section.py | Removed _view assignment in set_accessory and deleted the custom view setter that propagated view references to child items |
| discord/ui/item.py | Implemented recursive parent traversal in view property getter and added deprecation warning to the setter |
| discord/ui/container.py | Removed _view assignment logic in add_item, updated remove_item to use identity check and clear parent |
| discord/ui/action_row.py | Removed _view assignment in add_item, added parent clearing in remove_item |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: plun1331 <plun1331@gmail.com>
NeloBlivion
left a comment
There was a problem hiding this comment.
This addresses everything I was gonna pr later and then some so yeah lgtm 🙏
plun1331
left a comment
There was a problem hiding this comment.
Thoughts on removing i.view = ... entirely?
I'm inclined to say no because then it'd actually be breaking from 2.6.1, but the deprecation itself is fine by me |
Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com>
Lumabots
left a comment
There was a problem hiding this comment.
appart from paillat comment lgtm
Signed-off-by: Paillat <paillat@pycord.dev>
Signed-off-by: Paillat <jeremiecotti@ik.me>
Added return type annotation for remove_item method. Signed-off-by: Paillat <paillat@pycord.dev>
* feat: rework how item.view is determined * docs: changelog * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/ui/view.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: plun1331 <plun1331@gmail.com> * remove useless stuff * fuckin circles man * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/ui/item.py Signed-off-by: Paillat <jeremiecotti@ik.me> * Annotate return type for remove_item method Added return type annotation for remove_item method. Signed-off-by: Paillat <paillat@pycord.dev> --------- Signed-off-by: plun1331 <plun1331@gmail.com> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Signed-off-by: Paillat <paillat@pycord.dev> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Co-authored-by: Paillat <paillat@pycord.dev>
* feat: rework how item.view is determined * docs: changelog * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/ui/view.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: plun1331 <plun1331@gmail.com> * remove useless stuff * fuckin circles man * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/ui/item.py Signed-off-by: Paillat <jeremiecotti@ik.me> * Annotate return type for remove_item method Added return type annotation for remove_item method. Signed-off-by: Paillat <paillat@pycord.dev> --------- Signed-off-by: plun1331 <plun1331@gmail.com> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Signed-off-by: Paillat <paillat@pycord.dev> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Co-authored-by: Paillat <paillat@pycord.dev>
* chore(deps): upgrade pre-commit hook asottile/pyupgrade to v3.21.1 (Pycord-Development#2996) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade softprops/action-gh-release action to v2.4.2 (Pycord-Development#2997) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency pre-commit to v4.4.0 (Pycord-Development#2998) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade pre-commit hook psf/black-pre-commit-mirror to v25.11.0 (Pycord-Development#2999) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency pytest-asyncio to ~=1.3.0 (Pycord-Development#3000) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: Fix breaking change in `ui.Select` Generic typing (Pycord-Development#3002) * Update select.py * fix: update TypeVar defaults for BaseView and DesignerModal in select.py * Update discord/ui/select.py Co-authored-by: Paillat <jeremiecotti@ik.me> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com> * fix: update TypeVar default for V in select.py * fix: update changelog to reflect fix for breaking change in ui.Select Generic typing * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com> Co-authored-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore(deps): upgrade pre-commit hook asottile/pyupgrade to v3.21.2 (Pycord-Development#3006) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency msgspec to ~=0.20.0 (Pycord-Development#3009) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * docs: 📝 Fix versionadded for bypass slowmode permission to 2.7 (Pycord-Development#3010) :memo: Fix versionadded for bypass slowmode permission to 2.7 * chore(deps): upgrade actions/checkout action to v6 (Pycord-Development#3007) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency pre-commit to v4.5.0 (Pycord-Development#3008) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency bandit to v1.9.2 (Pycord-Development#3005) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency pytest to v9 (Pycord-Development#2995) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: ♻️ Make Attachment.save clearer by expliciting that chunksize is non-null (Pycord-Development#2991) Co-authored-by: plun1331 <plun1331@gmail.com> * fix: 🐛 Fix paginator implementation when only passing `PageGroup` objects and `show_menu` is falsy (Pycord-Development#2993) * chore(deps): upgrade pre-commit hook psf/black-pre-commit-mirror to v25.12.0 (Pycord-Development#3021) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: 🐛 Use `.parent` when disabling items on timeout for private channel messages (Pycord-Development#3016) * chore(deps): upgrade actions/cache action to v5 (Pycord-Development#3026) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * refactor: rework how item.view is determined (Pycord-Development#2981) * feat: rework how item.view is determined * docs: changelog * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/ui/view.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: plun1331 <plun1331@gmail.com> * remove useless stuff * fuckin circles man * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/ui/item.py Signed-off-by: Paillat <jeremiecotti@ik.me> * Annotate return type for remove_item method Added return type annotation for remove_item method. Signed-off-by: Paillat <paillat@pycord.dev> --------- Signed-off-by: plun1331 <plun1331@gmail.com> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Signed-off-by: Paillat <paillat@pycord.dev> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Co-authored-by: Paillat <paillat@pycord.dev> * chore(deps): upgrade dependency pre-commit to v4.5.1 (Pycord-Development#3028) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade actions/upload-artifact action to v6 (Pycord-Development#3027) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade crowdin/github-action action to v2.13.0 (Pycord-Development#3015) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade softprops/action-gh-release action to v2.5.0 (Pycord-Development#3014) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency mypy to ~=1.19.1 (Pycord-Development#3011) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * docs: 📝 Fixes (Pycord-Development#3030) * 📝 Fix formatting for gateway links in docstrings * 📝 Fix documentation for default value type in mentionable select * 🐛 Fix import path for Interaction in label.py * 📝 Exclude 'cog' member from SlashCommand documentation * 📝 Fix documentation of `check_any` * 📝 Fix section heading underline lenght in docstring sections * feat: ✨ Add `fetch_roles_member_counts` method to `Guild` and corresponding HTTP route (Pycord-Development#3020) * ✨ Add `fetch_roles_member_counts` method to `Guild` and corresponding HTTP route * 📝 CHANGELOG.md * ♻️ Add GuildRoleCounts class for mapping role IDs to member counts * ✨ Add custom __repr__ method to GuildRoleCounts for improved representation * 📝 Add usage examples for fetching member counts in GuildRoleCounts * Update discord/guild.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me> * style(pre-commit): auto fixes from pre-commit.com hooks * 📝 Document raised exception for fetching role member counts in GuildRoleCounts * ♻️ Enhance GuildRoleCounts with TypeVar and add __contains__ method for role ID checks * 📝 CHANGELOG.md --------- Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix(actions): rework release workflow (Pycord-Development#3034) * chore: empty (Pycord-Development#3035) * chore: empty * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix: "fix" bandit issues * chore(release): update CHANGELOG.md for version 2.7.0 * fix: Update checkout action to v6 in release workflow Signed-off-by: Lala Sabathil <lala@pycord.dev> * chore(actions): cleanup * fix(actions): gh milestone create takes -t arg * chore: empty (Pycord-Development#3036) * chore: empty * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore: ⚰️ Remove meaningless TODO comment from interactions.py (Pycord-Development#3039) :coffin: Remove meaningless TODO comment from interactions.py * fix: :bug: Set `cached_message` attribute to `RawMessageUpdateEvent` on message edits (Pycord-Development#3038) * 🐛 Set cached_message attribute to RawMessageUpdateEvent on message edits * 📝 CHANGELOG.md --------- Co-authored-by: Lala Sabathil <lala@pycord.dev> * docs: Fix typo in enums.rst documentation (Pycord-Development#3045) Fix typo in enums.rst documentation fix "stringly typed" to "strongly typed" Signed-off-by: Ryan Hou <rhou7873@gmail.com> * fix: 🐛 Add permission check to `Role.is_assignable()` (Pycord-Development#3048) Co-authored-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: ✨Add `BaseEmoji.extension` and fix animated emoji downloads (Pycord-Development#3055) * ✨🐛 Add extension property and fix animated emoji url * Update changelog accordingly * style(pre-commit): auto fixes from pre-commit.com hooks * 📝 Add versionadded * Apply change requests Co-authored-by: Paillat-dev <me@paillat.dev> * style(pre-commit): auto fixes from pre-commit.com hooks * Apply change requests 2 Co-authored-by: Paillat-dev <me@paillat.dev> * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat-dev <me@paillat.dev> * fix: 🐛 Fallback to resolving channel with interaction data when not cached (Pycord-Development#3047) * :fix: Fallback to resolving channel with interaction channel data when channel is missing from cache * 📝 CHANGELOG.md * Fix wording in CHANGELOG for clarity Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> --------- Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> * chore(deps): upgrade ribtoks/tdg-github-action action to v0.4.16 (Pycord-Development#3058) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): upgrade dependency myst-parser to v5 (Pycord-Development#3066) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: 🐛 Correct page group assignment in Paginator (Pycord-Development#3065) * fix: 🐛 Correct page group assignment in Paginator * style(pre-commit): auto fixes from pre-commit.com hooks * fix: 🐛 Update changelog to include fix for incorrect page group assignment in Paginator --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * docs: 💄 Add width appearance selector to docs (Pycord-Development#3040) * 💄 Add width appearance selector to docs * ♻️ Use `padding:` --------- Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> * docs: Update localizations from Crowdin (Pycord-Development#3068) Co-authored-by: Crowdin Bot <support+bot@crowdin.com> * fix: 🐛 Fix docs rendering for `ForwardedMessage` and `MessageSnapshot` and add missing attributes (Pycord-Development#3051) * 📝 Add missing rendering for MessageSnapshot in docs * 📝 Add missing rendering for ForwardedMessage in docs * 🐛 Add missing mentions property for ForwardedMessage * style(pre-commit): auto fixes from pre-commit.com hooks * Add to changelog * style(pre-commit): auto fixes from pre-commit.com hooks * Correct data conversion * Correct docstring data type * 📝 Add note in docs to inform about empty list possibility * 📝 Update role_mentions docs to warn about its usage * Implement type attribute * Update changelog accordingly * Copy role mentions logic from `Message` This knowingly doesn't work yet due to a Discord limitation / unresolved discussion on the API. A warning in the docs is in place * Add missing type information * Update changelog * Update CHANGELOG.md , Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: ToothyDev <55001472+ToothyDev@users.noreply.github.com> --------- Signed-off-by: ToothyDev <55001472+ToothyDev@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> * chore(deps): upgrade dependency bandit to v1.9.3 (Pycord-Development#3070) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(pre-commit): pre-commit autoupdate (Pycord-Development#3071) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix: 📝 Add missing docs to `.respond` methods (Pycord-Development#3061) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <paillat@pycord.dev> * docs: changelog patches (Pycord-Development#3075) * docs: changelog patches * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore(deps): upgrade crowdin/github-action action to v2.14.0 (Pycord-Development#3072) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: Unify API and gateway version constants (Pycord-Development#3080) * fix: Unify API and gateway version constants Introduced a new constants module to define API_VERSION and GATEWAY_VERSION, and updated gateway and HTTP modules to use these shared constants. This prevents version drift between REST and gateway usage. Updated the changelog to reflect this change. * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Revert "fix: Unify API and gateway version constants (Pycord-Development#3080)" This reverts commit ff6464e. * fix: remove unused identify property * fix: 🐛 Primary guild update not firing `on_user_update` (Pycord-Development#3077) Co-authored-by: Paillat <jeremiecotti@ik.me> Co-authored-by: Paillat-dev <me@paillat.dev> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <paillat@pycord.dev> * docs: update slash options example (Pycord-Development#3083) * fix: 🎨 Format code (Pycord-Development#3085) * chore(docs): ⬆️ upgrade Sphinx and related dependencies to latest versions (Pycord-Development#3067) * ⬆️ chore(docs): upgrade Sphinx and related dependencies to latest versions * ➖ Remove sphinxcontrib_trio dependency * ➕ Add back sphinxcontrib_trio because it got updated * 📝 CHANGELOG.md * chore: ⬆️ Bump `setuptools` to version `77.0.3` in pyproject.toml (Pycord-Development#3054) :arrow_up: Bump `setuptools` to version `77.0.3` in pyproject.toml * fix: :bug: Set autocomplete instance method status on `Option` directly (Pycord-Development#3082) * 🐛 Set autocomplete instance method status on `Option` directly * 📝 CHANGELO * Update CHANGELOG.md Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me> --------- Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> * fix: ♻️ Handle exceptions during message edits in Paginator and BaseView timeouts (Pycord-Development#3019) * fix: ♻️ Handle discord.HTTPException during message edits in Paginator and BaseView * style(pre-commit): auto fixes from pre-commit.com hooks * fix: ♻️ Update changelog to reflect changes in BaseView and Paginator timeout behavior * Update discord/ext/pages/pagination.py Co-authored-by: Paillat <jeremiecotti@ik.me> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com> * fix: reorder timeout error handling in changelog * style(pre-commit): auto fixes from pre-commit.com hooks * fix: format changelog for better readability * style(pre-commit): auto fixes from pre-commit.com hooks * chore: update changelog with new features, changes, and fixes for version 2.7.0 * style(pre-commit): auto fixes from pre-commit.com hooks * chore: update changelog with new features, changes, and fixes for Components V2 and other improvements * fix: improve error handling and clean up type annotations in Paginator and BaseView * style(pre-commit): auto fixes from pre-commit.com hooks * fix: improve message handling and type hint formatting in BaseView and ViewStore * style(pre-commit): auto fixes from pre-commit.com hooks * fix: replace discord error references with local imports in BaseView * style(pre-commit): auto fixes from pre-commit.com hooks * Apply suggestion from @Paillat-dev Signed-off-by: Paillat <jeremiecotti@ik.me> * style(pre-commit): auto fixes from pre-commit.com hooks * Update CHANGELOG.md Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com> --------- Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <jeremiecotti@ik.me> Co-authored-by: Paillat <paillat@pycord.dev> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> * fix: 🐛 Only remove custom view item from paginator if it is in it (Pycord-Development#3090) * 🐛 Only remove custom view item from paginator if it is in it * 📝 CHANGELOG.md * fix: General fixes for views (Pycord-Development#3032) * introduce replace_item and some additional patches * style(pre-commit): auto fixes from pre-commit.com hooks * cls * style(pre-commit): auto fixes from pre-commit.com hooks * rework underlying * style(pre-commit): auto fixes from pre-commit.com hooks * maybe fixed * , * or * spacing * replace and remove on gallery * style(pre-commit): auto fixes from pre-commit.com hooks * index * select_type * row * type * cl * style(pre-commit): auto fixes from pre-commit.com hooks * fix(actions): rework release workflow (Pycord-Development#3034) * fix(actions): rework release workflow * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-Authored-By: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * style(pre-commit): auto fixes from pre-commit.com hooks * style(pre-commit): auto fixes from pre-commit.com hooks * revert cl * files * file again * one more * cl * style(pre-commit): auto fixes from pre-commit.com hooks * buildout for new features & items aliases * style(pre-commit): auto fixes from pre-commit.com hooks * fix * style(pre-commit): auto fixes from pre-commit.com hooks * Iterator, * style(pre-commit): auto fixes from pre-commit.com hooks * fix modal typing * correct return types * fix modal error docs * remove incorrect release script * fix paginator * style(pre-commit): auto fixes from pre-commit.com hooks * doc fix * add convenience methods to DesignerView * style(pre-commit): auto fixes from pre-commit.com hooks * adjust underlying order * fix fileupload * misc * view.add_row * misc fixes * style(pre-commit): auto fixes from pre-commit.com hooks * fix * adjust legacy item attributes * style(pre-commit): auto fixes from pre-commit.com hooks * width docs adjustment * style(pre-commit): auto fixes from pre-commit.com hooks * remove new features for 3093 * style(pre-commit): auto fixes from pre-commit.com hooks * change row to deprecation * remove uncertain paginator fix * file setter * media setter * dead changelog * Update discord/ext/pages/pagination.py Co-authored-by: Paillat <jeremiecotti@ik.me> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> * Update discord/ui/select.py Signed-off-by: Paillat <jeremiecotti@ik.me> * Update discord/ui/button.py Signed-off-by: Paillat <jeremiecotti@ik.me> --------- Signed-off-by: Lala Sabathil <lala@pycord.dev> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <lala@pycord.dev> Co-authored-by: Paillat <paillat@pycord.dev> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: Paillat <jeremiecotti@ik.me> * chore(actions): disable dn * chore(actions): bump execute-whitelist-action to v2.1.0 Update .github/workflows/release.yml to use Pycord-Development/execute-whitelist-action@v2.1.0 (was v2.0.0) for the Security Check step so the release workflow picks up the latest fixes and improvements. * chore(release): update CHANGELOG.md for version 2.7.1 --------- Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com> Signed-off-by: plun1331 <plun1331@gmail.com> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Signed-off-by: Paillat <paillat@pycord.dev> Signed-off-by: Paillat <jeremiecotti@ik.me> Signed-off-by: Lala Sabathil <lala@pycord.dev> Signed-off-by: Ryan Hou <rhou7873@gmail.com> Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: ToothyDev <55001472+ToothyDev@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lumouille <144063653+Lumabots@users.noreply.github.com> Co-authored-by: Paillat <jeremiecotti@ik.me> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paillat <paillat@pycord.dev> Co-authored-by: plun1331 <plun1331@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nelo <41271523+NeloBlivion@users.noreply.github.com> Co-authored-by: Lala Sabathil <lala@pycord.dev> Co-authored-by: NyuwBot <nyuw@aitsys.dev> Co-authored-by: Ryan Hou <rhou7873@gmail.com> Co-authored-by: ToothyDev <55001472+ToothyDev@users.noreply.github.com> Co-authored-by: Paillat-dev <me@paillat.dev> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com>
Summary
This changes the way that
ViewItem.viewis determined.Before:
Now:
I have deprecated manually setting
.view, though I am considering removing it outright, though that would be breaking. Open for discussion.Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.