? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
12 Oct 2020

Pull Request for part of Issue #31004

Summary of Changes

As title says.
Concerns:

  1. Articles view
  2. Featured articles view
  3. Fields view
  4. Fields => Groups view
  5. Tags view

Other views already take care of this aspect.

Testing Instructions

For each of these views, trash some items and then filter by Trashed status.
Select a trashed item and click on the Actions dropdown.

Actual result BEFORE applying this Pull Request

The Trash choice displays

Screen Shot 2020-10-12 at 10 06 31

Expected result AFTER applying this Pull Request

The trash choice does not display

Screen Shot 2020-10-12 at 09 59 54

Documentation Changes Required

avatar infograf768 infograf768 - open - 12 Oct 2020
avatar infograf768 infograf768 - change - 12 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2020
Category Administration com_content com_fields com_newsfeeds com_tags
avatar brianteeman
brianteeman - comment - 12 Oct 2020

The problem with this approach (which has been tried before) is that you can not trash an item when you have the filter set to all

image

avatar infograf768
infograf768 - comment - 12 Oct 2020

The problem with this approach (which has been tried before) is that you can not trash an item when you have the filter set to all

I understand. FYI this approach is already used in other components view.

Example for contacts

			if ($this->state->get('filter.published') != -2)
			{
				$childBar->trash('contacts.trash')->listCheck(true);
			}

for categories

			if ($canDo->get('core.edit.state') && $this->state->get('filter.published') != -2)
			{
				$childBar->trash('categories.trash')->listCheck(true);
			}

One solution could be to change each conditional to something like


			if ($canDo->get('core.edit.state') && ($this->state->get('filter.published') != -2 || !$this->state->get('filter.published') === '*'))
			{
				$childBar->trash('categories.trash')->listCheck(true);
			}

In this case Trash will display also when status is set to All

avatar infograf768
infograf768 - comment - 13 Oct 2020

@gostn
com_fields is used for all components
articles, contacts, users

avatar infograf768
infograf768 - comment - 13 Oct 2020

question was, if all component-views are meant to test.

Not necessary. One is enough.
But anyway, a decision has to be taken concerning #31074 (comment) which would modify this patch

@HLeithner @wilsonge

avatar HLeithner
HLeithner - comment - 13 Oct 2020

Joomla always had it that way, make it as hard as possible to delete an item...

I'm not sure if we should change this...

avatar infograf768
infograf768 - comment - 13 Oct 2020

The decision here is simple:
or we forget this patch and make a new one for the items where hiding the Trash dropdown is already implemented and kill this behavior (examples above), or we follow up on this patch and add code to display the trash only when the list is not filtered by trashed or filtered by all.

avatar HLeithner
HLeithner - comment - 13 Oct 2020

Show the trash only when the filter is on "trashed" and remove the separate "trash" button

avatar infograf768
infograf768 - comment - 13 Oct 2020

The separate button is Empty Trash, not Trash.
We can, in an other PR, move it to the dropdown and change anyway its wording to Delete.

In the mean while, I understand that this PR is fine and we are not going to consider filtering by All as necessitating the display of Trash in the dropdown.

avatar infograf768
infograf768 - comment - 13 Oct 2020

@gostn
I guess you can test now :)

avatar infograf768
infograf768 - comment - 14 Oct 2020

@infograf768 can you update test instructions?

What shall I update?

avatar infograf768 infograf768 - change - 14 Oct 2020
The description was changed
avatar infograf768 infograf768 - edited - 14 Oct 2020
avatar infograf768 infograf768 - change - 14 Oct 2020
The description was changed
avatar infograf768 infograf768 - edited - 14 Oct 2020
avatar infograf768
infograf768 - comment - 14 Oct 2020

Done

avatar infograf768
infograf768 - comment - 14 Oct 2020

@gostn
#31074 (comment)

I had a discussion with @HLeithner and we decided filtering by All did not necessitate having Trash as a choice in the dropdown.

avatar infograf768
infograf768 - comment - 14 Oct 2020

It means this PR is ready for testing.

avatar brianteeman
brianteeman - comment - 14 Oct 2020

I had a discussion with @HLeithner and we decided filtering by All did not necessitate having Trash as a choice in the dropdown.

That's disappointing

avatar HLeithner
HLeithner - comment - 14 Oct 2020

The filter on trashed state is a "human accident" protection (like the complete trash concept).

The concept to change the state to trashed is a ux fail in my opinion and should/could be optimised with a better ui, maybe a button "show trash" which basically set only the filter.

We can came back to to "delete" on all filter " when we change the action drop down to a more dynamic list based on the state of the selexted items.

avatar adj9 adj9 - test_item - 15 Oct 2020 - Tested successfully
avatar adj9
adj9 - comment - 15 Oct 2020

I have tested this item successfully on 21c4650

Done


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31074.

avatar infograf768
infograf768 - comment - 16 Oct 2020

@gostn

Without PR in ´News Feed > Feed´ theres no ´Trash´, its ´Empty Trash´, same with PR:

This is totally unrelated to this patch.
The matter of normalising the "Empty Trash" button by

  1. Changing its wording to "Delete"
  2. Displaying it in the Actions dropdown when filtering by trashed items

Is a separate issue.

Once this PR is merged, i.e when we, at last, get a second positive test, merge and move along, we can discuss and create another PR concerning this matter.

What some could consider as an issue is the length of the dropdown in some cases (yes, I already have a PR ready):

Screen Shot 2020-10-13 at 10 59 26

avatar infograf768
infograf768 - comment - 16 Oct 2020

Newsfeeds is taken care of in this PR concerning hiding the Trash action in the Actions dropdown when filtering by Trashed items.
The Empty trash being displayed in the Actions dropped down is not modified here. It is a different behavior than other components indeed where we have a separate button and is a separate matter...

avatar infograf768
infograf768 - comment - 16 Oct 2020

You are right. It was already implemented before this patch.
Here I just added some code that was useless as $canDo->get('core.edit.state') was already there.

modifying now as the feature was present for newsfeeds.

avatar infograf768 infograf768 - change - 16 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2020
Category Administration com_content com_fields com_newsfeeds com_tags Administration com_content com_fields com_tags
avatar infograf768
infograf768 - comment - 16 Oct 2020

Modified to take off redundant check for newsfeeds.
Modified test instructions.

avatar infograf768 infograf768 - change - 16 Oct 2020
The description was changed
avatar infograf768 infograf768 - edited - 16 Oct 2020
avatar infograf768 infograf768 - alter_testresult - 16 Oct 2020 - adj9: Tested successfully
avatar AndyGaskell AndyGaskell - test_item - 16 Oct 2020 - Tested successfully
avatar AndyGaskell
AndyGaskell - comment - 16 Oct 2020

I have tested this item successfully on 928a680

Before and after, it looks like the screen grabs in the testing instructions, when testing the patch, thanks @infograf768


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31074.

avatar AndyGaskell
AndyGaskell - comment - 16 Oct 2020

Before, screen grab...
31074_before

After, screen grab...
31074_after

avatar infograf768 infograf768 - change - 16 Oct 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 16 Oct 2020

RTC. Thanks for testing!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31074.

avatar rdeutz rdeutz - close - 16 Oct 2020
avatar rdeutz rdeutz - merge - 16 Oct 2020
avatar rdeutz rdeutz - change - 16 Oct 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-16 11:05:58
Closed_By rdeutz
Labels Added: ?
avatar brianteeman
brianteeman - comment - 16 Oct 2020

This should not have been merged as it causes a major loss in functionality

Add a Comment

Login with GitHub to post a comment