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

feat: new acore_string editor #3210

Merged
merged 7 commits into from
Dec 21, 2024
Merged

Conversation

Exitare
Copy link
Member

@Exitare Exitare commented Dec 20, 2024

Adds a new editor for the acore_string table for the section "Other texts".
I realized yesterday that there isn't an editor or at least search field for this table and decided to implement it.

image

imports: [TranslateModule, ReactiveFormsModule, TooltipModule, QueryOutputComponent, TopBarComponent],
})
export class AcoreStringComponent extends SingleRowEditorComponent<AcoreString> {
override readonly editorService = inject(AcoreStringService);
Copy link
Collaborator

Choose a reason for hiding this comment

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

since Angular 14 we can access protected attributes also from the template, so there is very rarely a reason to use public and when we don't it's just because it's old code :)

Suggested change
override readonly editorService = inject(AcoreStringService);
protected override readonly editorService = inject(AcoreStringService);

Copy link
Member Author

Choose a reason for hiding this comment

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

This change causes this error:
TS2415: Class AcoreStringComponent incorrectly extends base class SingleRowEditorComponent
Property editorService is protected in type AcoreStringComponent but public in type SingleRowEditorComponent<AcoreString

And changing the editor causes a follow up issue.
IMO; this is a separate problem to be addressed

Copy link
Collaborator

@FrancescoBorzi FrancescoBorzi left a comment

Choose a reason for hiding this comment

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

Your code looks very good! Thank you very much for this contribution. I've just left a couple of minor suggestions here and there. I hope I will have some time soon to test this PR and then we can merge it! <3

@FrancescoBorzi FrancescoBorzi changed the title Add new acore_string editor feat: new acore_string editor Dec 20, 2024
Copy link
Collaborator

@FrancescoBorzi FrancescoBorzi left a comment

Choose a reason for hiding this comment

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

Please fix the bug of the sidebar by using the correct handler service

@FrancescoBorzi FrancescoBorzi merged commit eeb0d78 into azerothcore:master Dec 21, 2024
12 checks passed
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.

3 participants