-
Notifications
You must be signed in to change notification settings - Fork 15
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 Add default link type title and icon #177
FIX Add default link type title and icon #177
Conversation
This PR is still in draft, but in another comment you indicated it might be ready for merge - should this still be a draft? |
0fdd946
to
7a5ef25
Compare
Thank you. Yes, It's ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if the correct icon and "title" were used, since that information does exist. But that would require a bit more refactoring since that information is currently included in the types prop rather than as part of the link data.
I'm on the fence about whether that would be worth the effort.
@emteknetnz do you have any thoughts on this one? This is what it looks like with this PR if only a phone link is allowed:
It is an improvement from the current behaviour and I'm inclined to merge as-is, but I want a second opinion so we can avoid coming back to this later and going "we should show the actual icon, why are we doing this?" and redoing this work.
Making the link read only as mentioned at https://silverstripeltd.slack.com/archives/GNHGJT5G8/p1705615609845979?thread_ts=1705612719.609119&cid=GNHGJT5G8 seems like a much better solution. Seems wrong to be able to edit existing though disallowed links I think we'll need to refactor some PHP and JS so that ALL types including disallowed are passed by the Ajax request, though also add in an |
This PR and issue has nothing to do with functionality - it's just about how the link is displayed in the list (specifically the icon and the "External link"/"Phone number"/"Link"/etc text). So that read-only part is out of scope, and will be dealt with separately.
Does this mean you want to show the correct link for any given link, regardless of whether that link is allowed? That was ultimately the question here. |
I'd say close this PR, if we're going to change this to readonly showing the correct icons then there's no point adding the code in this PR because we'll ultimately just remove it |
I don't understand your logic? Making the modal readonly doesn't affect what icon is displayed. |
Sorry, including what I said #177 (comment) - show the correct icon + link type text rather than defaults |
As discussed, please update this PR to show the correct icon and text for links, even when those links are not in the "allowed" list. Some ways you could do that:
|
1937c92
to
e61d2c5
Compare
e61d2c5
to
0fd79cd
Compare
Parent issue