Skip to content

Commit

Permalink
Remove --inline-actions variant of listing tables
Browse files Browse the repository at this point in the history
This was added in f322e9d, when the
snippets listing view was briefly redesigned to put the "Edit", "Delete"
etc. actions in the same line as the title instead of in a new line.

With the universal listings design, all listing actions are put inside a
three-dot dropdown menu.

This style is no longer used anywhere in Wagtail, especially now that
the HistoryView has been reimplemented using the dropdown menu for the
actions.
  • Loading branch information
laymonage authored and thibaudcolas committed Apr 30, 2024
1 parent b8dd7f4 commit 08ee15a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 36 deletions.
34 changes: 4 additions & 30 deletions client/scss/components/_listing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ ul.listing {

.title {
word-break: break-word;
display: flex;
align-items: center;
justify-content: space-between;
gap: theme('spacing.2');

.title-wrapper,
h2 {
Expand Down Expand Up @@ -261,36 +265,6 @@ ul.listing {
}
}

&--inline-actions td.title {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.5rem;

.title-wrapper {
margin-inline-end: 2.5em;
}

.w-status {
margin: 0;
}
}

&--inline-actions .actions {
display: inline-block;
margin-top: 0;
vertical-align: inherit;

li {
margin-bottom: 0;
}

.button {
vertical-align: inherit;
}
}

.moderate-actions form {
float: inline-start;
margin: 0 1em 1em 0;
Expand Down
1 change: 1 addition & 0 deletions client/scss/components/_status-tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
border-radius: 2px;
text-align: center;
display: inline-block;
word-break: normal;
// stylelint-disable-next-line property-disallowed-list
text-transform: uppercase;
padding: 0 0.5em;
Expand Down
4 changes: 0 additions & 4 deletions wagtail/admin/ui/tables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,3 @@ def classname(self):
@cached_property
def attrs(self):
return self.table.get_row_attrs(self.instance)


class InlineActionsTable(Table):
classname = "listing listing--inline-actions"
3 changes: 1 addition & 2 deletions wagtail/admin/views/generic/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
MultipleUserFilter,
WagtailFilterSet,
)
from wagtail.admin.ui.tables import Column, DateColumn, InlineActionsTable, UserColumn
from wagtail.admin.ui.tables import Column, DateColumn, UserColumn
from wagtail.admin.utils import get_latest_str
from wagtail.admin.views.generic.base import (
BaseListingView,
Expand Down Expand Up @@ -197,7 +197,6 @@ class HistoryView(PermissionCheckedMixin, BaseObjectMixin, BaseListingView):
is_searchable = False
paginate_by = 20
filterset_class = HistoryFilterSet
table_class = InlineActionsTable
history_url_name = None
history_results_url_name = None
edit_url_name = None
Expand Down

0 comments on commit 08ee15a

Please sign in to comment.