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

[Select, Expandable]: Refactor content projection directives #508

Merged
merged 11 commits into from
Dec 12, 2024

Conversation

videoeero
Copy link
Contributor

@videoeero videoeero commented Dec 10, 2024

Jira ticket: https://funidata.atlassian.net/browse/DS-392

As follow up to PR #498 refactoring other components using content projection. Because Expandable Content and Select Options are usually lazy loaded, those directives weren't at this time converted to <fudis-traditional-selector-syntax> These are still used with <ng-template> but selector was tweaked.

Breaking changes and migration guidelines below:

Expandable Actions
Previously in HTML template: <ng-template fudisActions type="expandable">
Now in HTML template: <fudis-expandable-actions>
Previous import name: ActionsDirective
Current import name: ExpandableActionsDirective

Expandable Content
Previously in HTML template: <ng-template fudisContent type="expandable">
Now in HTML template: <ng-template fudisExpandableContent>
Previous import name: ContentDirective
Current import name: ExpandableContentDirective

Select Options
Previously in HTML template: <ng-template fudisContent type="select-options">
Now in HTML template: <ng-template fudisSelectOptions>
Previous import name: ContentDirective
Current import name: SelectOptionsDirective

@videoeero videoeero added the breaking change This change is not backwards-compatible label Dec 10, 2024
@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 10, 2024 13:05 Destroyed
@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 10, 2024 13:38 Destroyed
@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 10, 2024 14:36 Destroyed
@MayaMarjut MayaMarjut self-requested a review December 11, 2024 09:30
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I would rename this file to expandable-content.directive.ts, so it would follow the same syntax. For example fielset-content.directive also includes content and actions, and furthermore Select Options content projection is named only select-options.directive. Exported name is fine, but maybe change the file name to shorter version?

@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 11, 2024 10:11 Destroyed
import { GridApiDirective } from './directives/grid/grid-api/grid-api.directive';
import { GridDirective } from './directives/grid/grid/grid.directive';
import { GridItemDirective } from './directives/grid/grid-item/grid-item.directive';
import { GroupComponentBaseDirective } from './directives/form/group-component-base/group-component-base.directive';

import { LinkDirective } from './directives/link/link.directive';
import { SectionActionsDirective } from './directives/content-projection/section/section-content.directive';
import { SectionContentDirective } from './directives/content-projection/section/section-content.directive';
import { SectionActionsDirective } from './components/section/section-content.directive';
Copy link
Contributor

Choose a reason for hiding this comment

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

Put these following imports to same path

@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 11, 2024 12:19 Destroyed
@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 11, 2024 12:51 Destroyed
@github-actions github-actions bot temporarily deployed to Documentation for branch DS-392-select-expandable-content-projection-update December 12, 2024 07:49 Destroyed
@RiinaKuu RiinaKuu merged commit 03efe99 into main Dec 12, 2024
10 checks passed
@RiinaKuu RiinaKuu deleted the DS-392-select-expandable-content-projection-update branch December 12, 2024 10:35
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change is not backwards-compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants