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

Fix/17179 block grid data label #2412

Conversation

Bakersbakebread
Copy link
Contributor

@Bakersbakebread Bakersbakebread commented Oct 5, 2024

Description

This pull request introduces refactorings to the UmbBlockGridEntriesElement and related context classes. The most important changes include adding new state properties to manage labels, updating methods to utilize these properties

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Enhancements to Label Management:

  • Added @state properties _resolvedCreateLabel and _createLabel to UmbBlockGridEntriesElement to manage dynamic label content. (src/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.ts)
    ** Introduced #finalizeCreateLabel method to determine the appropriate label text based on context and state. (src/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.ts)
  • Updated the button label in the template to use _resolvedCreateLabel. (src/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.ts)

Context Class Updates:

  • Added #createLabel state and corresponding observable in UmbBlockGridEntriesContext. (src/packages/block/block-grid/context/block-grid-entries.context.ts)
  • Observed createLabel from UmbBlockGridManagerContext and updated #createLabel in UmbBlockGridEntriesContext. (src/packages/block/block-grid/context/block-grid-entries.context.ts)
  • Added createLabel observable part in UmbBlockGridManagerContext to provide label configuration. (src/packages/block/block-grid/context/block-grid-manager.context.ts)

fixes umbraco/Umbraco-CMS#17179

@IbrahimMNada
Copy link
Contributor

IbrahimMNada commented Oct 7, 2024

i think this is fixed on #2345 , with more generic reusable way

@madsrasmussen
Copy link
Contributor

This has been fixed as part of this PR, which also takes the Create Label of Areas into account:
#2424

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

Successfully merging this pull request may close these issues.

Block grid Create Button Label doesn't do anything
4 participants