-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support Htmlable
record titles
#6652
Support Htmlable
record titles
#6652
Conversation
PR Summary
|
@danharrin, shouldn't all |
HtmlString
Htmlable
record titles
Correct, yes |
Can we do this in v2 or would it be breaking somehow? |
Should I change it to |
We can probably change all the HtmlString types to Htmlable without breaking in v2, yes |
Could you handle this and mark as ready for review when done, @bernhardh? 😊 |
… into feature/allow-htmlstring-titles # Conflicts: # packages/admin/src/Pages/Page.php # packages/admin/src/Resources/Pages/Concerns/InteractsWithRecord.php # packages/admin/src/Resources/Resource.php
@zepfietje Done and thank you both for your great work! How to mark it as ready for review? I can't add labels to issues? |
Thanks, @bernhardh!
For drafts there's a button at the bottom of the PR where you'd usually have the merge button. I've marked it as ready now. 👍 |
Not a breaking change but ever since we upgraded our Filament version, we encountered this in PHPStan with level 8:
This is where we try to contcat |
Maybe cast it to a string first, @juliomotol? |
Tried that, and it says:
|
Right, then you could check if it's |
To add more context in this situation, we're not concatenating on |
@zepfietje wheren't these changes merged to v3? I am trying to update to v3, but they are once again not there. For example |
I think so. CC @danharrin. |
TLDR: This PR only adds
HtmlString
as a return type to thegetTitle
andgetRecordTitle
method.Reason:
I have a hotels resource, where some of the hotels have HTML inside their name, like
Hotel XY <sup>Superior</sup>
(Hotel XY Superior). On edit pages and inside the breadcrumb, this looks obviously uggly, since its rendered htmlencoded. After PR I can: