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

IBX-7126: Allowed passing extra parameters to pager of "My Drafts" tab #1012

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Nov 24, 2023

Question Answer
JIRA issue IBX-7126
Required by ibexa/dashboard#53
Type bug
Target Ibexa version v4.6
BC breaks no

When "My Drafts" Dashboard tab is rendered as a Customizable Dashboard Builder block, neither original request route name nor pagination parameter is available in a current context.

Parameters, in the end, after a few iterations, were seamlessly copied from main request to the block-rendering request via https://github.com/ibexa/dashboard/pull/53.

This PR allows merging extra Pagerfanta options coming from a template (see https://github.com/ibexa/dashboard/pull/53 for usage - passed extra routeName) with current rendering options.

Because of high coupling between MyDraftsTab and Twig Environment, I needed to stub Twig Environment to add test coverage for the change.

TODO

  • Unit test coverage for merging pager_options

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly.
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review.

@alongosz alongosz added the Bug Something isn't working label Nov 24, 2023
@alongosz alongosz changed the title IBX-7126: Fixed "My drafts" Dashboard tab pagination when used as a block IBX-7126: Allowed passing extra parameters to pager of "My Drafts" tab Dec 1, 2023
@alongosz alongosz force-pushed the ibx-7126-dashboard-my-drafts-pagination branch from 27c0d42 to 419ffd9 Compare December 1, 2023 16:45
@alongosz alongosz requested review from adamwojs, mikadamczyk and a team December 1, 2023 16:51
@alongosz
Copy link
Member Author

alongosz commented Dec 1, 2023

Update: the solution got slightly simplified and coverage was added.

@alongosz alongosz force-pushed the ibx-7126-dashboard-my-drafts-pagination branch from 419ffd9 to 840a776 Compare December 4, 2023 16:07
Copy link

sonarcloud bot commented Dec 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@micszo micszo self-assigned this Dec 5, 2023
@micszo micszo removed their assignment Dec 5, 2023
@webhdx webhdx merged commit aa0c1ee into main Dec 5, 2023
23 checks passed
@webhdx webhdx deleted the ibx-7126-dashboard-my-drafts-pagination branch December 5, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants