-
Notifications
You must be signed in to change notification settings - Fork 95
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 Allow status flags to be used generically #1856
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.badge { | ||
display: inline-block; | ||
background-color: $color-notice; | ||
border-color: transparent; | ||
color: $body-color-dark; | ||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These colours are fairly arbitrary but look nice as a default IMO. Only custom flags will use this styling, all of the versioned/fluent flags still use the colours they used to use. |
||
// Badges with no text aren't displayed | ||
&:empty { | ||
display: none; | ||
} | ||
} | ||
Comment on lines
+6
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This already gets inherited from bootstrap, but it surprised me at first. Adding it here so it's explicitly intended behaviour. |
||
|
||
.badge--breadcrumbs { | ||
border-width: 1px; | ||
border-style: solid; | ||
margin-left: $btn-spacing; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,8 +119,10 @@ html, body { | |
min-height: $toolbar-height; | ||
min-width: 250px; | ||
|
||
* { | ||
display: inline-block; // align back button and breadcrumbs | ||
// align back button and breadcrumbs | ||
// but specifically do NOT override badge display | ||
*:not(.badge) { | ||
Comment on lines
+122
to
+124
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required to respect the |
||
display: inline-block; | ||
} | ||
|
||
.section-icon { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@retry @job1 | ||
Feature: Search in GridField | ||
As a content author | ||
I want to see the status flags for records in gridfields | ||
So that I can see at a glance what state my data is in | ||
|
||
Background: | ||
Given the "Company" "Walmart" with "Category"="Retail" | ||
And the "group" "EDITOR" has permissions "Access to 'Pages' section" and "Access to 'GridField Test Navigation' section" and "TEST_DATAOBJECT_EDIT" | ||
And I am logged in as a member of "EDITOR" group | ||
|
||
Scenario: I see status flags in gridfields | ||
When I go to "/admin/gridfield-test-navigation" | ||
And I should see "Walmart" in the "#Form_EditForm .col-Name" element | ||
And I should see "string-flag" in the "#Form_EditForm .col-Name .badge.status-company-status-flag1" element | ||
And I should see "array-flag" in the "#Form_EditForm .col-Name .badge.status-company-status-flag2" element | ||
Then I click "Walmart" in the "#Form_EditForm" element | ||
And I should see "Walmart" in the ".breadcrumbs-wrapper" element | ||
And I should see "string-flag" in the ".breadcrumbs-wrapper .badge.status-company-status-flag1" element | ||
And I should see "array-flag" in the ".breadcrumbs-wrapper .badge.status-company-status-flag2" element |
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.
These were moved into the relevant modules - versioned-admin and advanced-workflow.