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

Asset browser pagination size changer #3957

Merged
merged 10 commits into from
Jul 6, 2021

Conversation

jackmcdade
Copy link
Member

Uses localStorage to store the option so it'll persist for a while.

Between this feature and shift-to-select-multiple, should be able to resolve #3142.

Uses localStorage to store the option so it'll persist for a while.

Between this feature and shift-to-select-multiple, should be able to resolve #3142.
@jackmcdade jackmcdade changed the title Feature/asset browser pagination size changer Asset browser pagination size changer Jul 6, 2021
Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

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

We have a HasPagination mixin that the entries listing (Listing.vue) uses that already handles saving the pagination size to user preferences. Maybe we can use that instead?

src/Http/Controllers/CP/Assets/BrowserController.php Outdated Show resolved Hide resolved
src/Http/Controllers/CP/Assets/BrowserController.php Outdated Show resolved Hide resolved
@jackmcdade
Copy link
Member Author

We have a HasPagination mixin that the entries listing (Listing.vue) uses that already handles saving the pagination size to user preferences. Maybe we can use that instead?

Wouldn't that use the same per_page setting between entries and assets then though?

@jasonvarga
Copy link
Member

It uses the preferencesPrefix property to save into different keys.

Here's how it does it in the entries/Listing component:

preferencesPrefix: `collections.${this.collection}`,

You'd do something like assets.${this.container.id}

@jackmcdade
Copy link
Member Author

jackmcdade commented Jul 6, 2021

Ah okay thanks, I'll give it a shot.

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

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

🔥

@jasonvarga jasonvarga merged commit cf4a302 into master Jul 6, 2021
@jasonvarga jasonvarga deleted the feature/asset-browser-pagination-size-changer branch July 6, 2021 19:51
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.

2 participants