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

feat: track and expose non-persistent views #843

Merged
merged 16 commits into from Jul 4, 2023

Conversation

EmreTech
Copy link
Collaborator

@EmreTech EmreTech commented Oct 10, 2022

Summary

This PR adds functionality to track and expose non-persistent views to the user. The user can manually add views to be tracked via Client.add_view and can retrieve all non-persistent views via Client.views.

Closes #14.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have run task pyright and fixed the relevant issues.
  • 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, ...)

@ooliver1
Copy link
Member

I think if there's TODOs, this PR should be a draft

@EmreTech EmreTech marked this pull request as draft October 10, 2022 14:54
@ooliver1 ooliver1 added t: enhancement Type: enhancement - new feature or request s: in progress Status: the issue or PR is in development/progress p: low Priority: low - not important to be worked on labels Oct 15, 2022
@EmreTech EmreTech marked this pull request as ready for review October 25, 2022 07:47
@EmreTech EmreTech added s: awaiting review Status: the issue or PR is awaiting reviews and removed s: in progress Status: the issue or PR is in development/progress labels Nov 2, 2022
nextcord/ui/view.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Skelmis Skelmis left a comment

Choose a reason for hiding this comment

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

This looks like a breaking change based on the removal of persistent_views, do we want to keep it instead but add a deprecation warning for future removal?

Missed the view store line, ignore this

Copy link
Collaborator

@Skelmis Skelmis left a comment

Choose a reason for hiding this comment

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

Untested, lgtm

nextcord/client.py Outdated Show resolved Hide resolved
nextcord/ui/view.py Outdated Show resolved Hide resolved
nextcord/state.py Outdated Show resolved Hide resolved
nextcord/client.py Outdated Show resolved Hide resolved
nextcord/ui/view.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@teaishealthy teaishealthy left a comment

Choose a reason for hiding this comment

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

untested

@EmreTech EmreTech merged commit f135f54 into nextcord:master Jul 4, 2023
10 checks passed
@EmreTech EmreTech removed the s: awaiting review Status: the issue or PR is awaiting reviews label Jul 4, 2023
@EmreTech EmreTech deleted the expose-non-persistent-views branch August 12, 2023 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: low Priority: low - not important to be worked on t: enhancement Type: enhancement - new feature or request
Projects
No open projects
Status: In Cycle
Development

Successfully merging this pull request may close these issues.

[v2] Expose non-persistent Views as a Client attribute
4 participants