Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat: Add breadcrumb var in CRUD template for AdminBundle#12202

Merged
lchrusciel merged 1 commit into
Sylius:masterfrom
toofff:feature/add-var-breadcrumb-in-admin-crud-template
Sep 20, 2021
Merged

Feat: Add breadcrumb var in CRUD template for AdminBundle#12202
lchrusciel merged 1 commit into
Sylius:masterfrom
toofff:feature/add-var-breadcrumb-in-admin-crud-template

Conversation

@toofff
Copy link
Copy Markdown
Contributor

@toofff toofff commented Dec 28, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets no
License MIT

@probot-autolabeler probot-autolabeler Bot added the Admin AdminBundle related issues and PRs. label Dec 28, 2020
@toofff toofff marked this pull request as ready for review December 28, 2020 21:03
@toofff toofff requested a review from a team as a code owner December 28, 2020 21:03
@Zales0123 Zales0123 added the Feature New feature proposals. label Dec 29, 2020
@Zales0123
Copy link
Copy Markdown
Contributor

Hi @toofff! I believe such a customization option is already introduced a level higher in this file. It, of course, is a little bit different - but the proposed solution seems as duplicated behaviour.

@toofff
Copy link
Copy Markdown
Contributor Author

toofff commented Dec 29, 2020

@Zales0123 I'm not thinking duplicating an existing solution.

Currently we can directly change the header and the subheader with a translation key that we want to put.
I just wanted to make the code homogeneous for the breadcrumb.

app_admin_page:
    resource: |
        alias: app.page
        section: admin
        path: /pages
        templates: "@SyliusAdmin\\Crud"
        redirect: update
        grid: app_admin_page
        permission: true
        vars:
            all:
                breadcrumb: app.ui.page.breadcrumb
                header: app.ui.page.header
                subheader: app.ui.page.subheader
    type: sylius.resource
    prefix: admin

However for the subheader variable we can define it with the subheader key or change the template with header_title key.

@toofff
Copy link
Copy Markdown
Contributor Author

toofff commented Jan 26, 2021

@Zales0123 do I have to keep the branch up to date or do I just delete my pull request?

@Zales0123
Copy link
Copy Markdown
Contributor

Hello, sorry for processing it long 🖖 Please, update to the master branch and I would like to see the opinion of other @Sylius/core-team members :)

@toofff
Copy link
Copy Markdown
Contributor Author

toofff commented Jan 26, 2021

@Zales0123 Done ;)

Copy link
Copy Markdown
Contributor

@lchrusciel lchrusciel left a comment

Choose a reason for hiding this comment

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

A small improvement, but I would vote for adding it.

A small problem that I have, is that we don't know how to test it and ensure, that it is working in the future. Probably it is true for the rest of these dynamic fields.

@stale
Copy link
Copy Markdown

stale Bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the Stale Issues and PRs with no recent activity, about to be closed soon. label Jun 26, 2021
@toofff
Copy link
Copy Markdown
Contributor Author

toofff commented Jun 29, 2021

@Zales0123 @lchrusciel are we closing my pull request or do you want to merge it? What do you need to merge it?

@lchrusciel lchrusciel merged commit c10ffa1 into Sylius:master Sep 20, 2021
@lchrusciel
Copy link
Copy Markdown
Contributor

Thanks, @toofff! 🎉

@lchrusciel
Copy link
Copy Markdown
Contributor

I was a long-lived PR, but lets put it to the master :) If I'm correct, we do not have any docs about this feature. May you propose something and contribute to docs?

@toofff toofff deleted the feature/add-var-breadcrumb-in-admin-crud-template branch September 23, 2021 14:57
@toofff
Copy link
Copy Markdown
Contributor Author

toofff commented Sep 23, 2021

@lchrusciel As soon as I have some time I will add this in the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin AdminBundle related issues and PRs. Feature New feature proposals. Stale Issues and PRs with no recent activity, about to be closed soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants