-
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
ENH Use getStatusFlags() instead of hardcoded statuses #351
ENH Use getStatusFlags() instead of hardcoded statuses #351
Conversation
color: #cf3f00; | ||
background-color: #fff2ea; |
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.
Rely on styling in admin for colours
&:not(:last-child) { | ||
margin-right: 5px; | ||
} |
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.
Needs a gap between badges - this value matches the right margin on the title text
return $this->renderWith([static::class, Link::class]); | ||
return (string) $this->renderWith([static::class, Link::class]); |
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.
Unrelated change - my IDE was upset that the return type was string but this returns DBHtmlText
- probably just because we're using strict mode here when we don't use it anywhere else.
830b957
to
f815bb1
Compare
f815bb1
to
287276b
Compare
}; | ||
|
||
const LinkPickerTitle = ({ | ||
id, | ||
title, | ||
description, | ||
versionState, | ||
statusFlags, |
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.
How is this prop being passed in? There's no corresponding PHP change in this PR?
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.
Yes there is. See the Link.php
file.
https://github.com/silverstripe/silverstripe-linkfield/pull/351/files#diff-10018e9f26d86c4bbc71cb5f4e152ce6566f03cf1f40e9ec606f125371a60ad5R241
Status flags are made generic in silverstripe/silverstripe-framework#11460
This PR uses the new
getStatusFlags()
method instead of building hardcoded status flags.Ends up looking something like this (custom flag added by overriding
getStatusFlags()
)Issue
SiteTree
inCMSMain
silverstripe-cms#2947