Language Change NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
24 Dec 2021

This is a fork and continuation of @PhilETaylor , now closed, original pr

Summary of Changes

Decide for yourself which columns to display for any table. The button shows an updating count of how many columns are shown. You can NOT hide the title column or the row select checkbox as this would make the table useless.

The choice of which column to display is stored in local storage so it is persistent for you in your browser for that site.
tables2

This should be added to every table and it can also be added by extension developers to their own table by just adding one line to the existing web assets.

// add the script
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns');

Testing Instructions

For the purposes of this pr it has only been applies to com_content articles and com_content featured articles

As there is new js you will need to run npm ci

Known Issue HELP PLEASE

The code from @PhilETaylor for local storage is not working 100% and I have no idea why. Its as if its being applied to a row instead of a column. See video below. ALL HELP on this part greatly appreciated. The js is almost meaningless to me so I can't fix it myself.

tables3

aa0ac93 23 Dec 2021 avatar brianteeman lang
3afbf44 24 Dec 2021 avatar brianteeman minus
avatar brianteeman brianteeman - open - 24 Dec 2021
avatar brianteeman brianteeman - change - 24 Dec 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Dec 2021
Category Administration com_content Language & Strings JavaScript Repository NPM Change
82dc916 24 Dec 2021 avatar brianteeman cs
avatar brianteeman brianteeman - change - 24 Dec 2021
Labels Added: Language Change NPM Resource Changed ?
avatar brianteeman brianteeman - change - 24 Dec 2021
The description was changed
avatar brianteeman brianteeman - edited - 24 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jan 2022
Category Administration com_content Language & Strings JavaScript Repository NPM Change Administration com_content Language & Strings Repository NPM Change JavaScript Libraries
avatar brianteeman brianteeman - change - 6 Jan 2022
The description was changed
avatar brianteeman brianteeman - edited - 6 Jan 2022
avatar brianteeman brianteeman - change - 6 Jan 2022
The description was changed
avatar brianteeman brianteeman - edited - 6 Jan 2022
avatar brianteeman
brianteeman - comment - 6 Jan 2022

@Fedik any ideas on the js bug?

1236207 6 Jan 2022 avatar brianteeman lint
avatar Fedik
Fedik - comment - 6 Jan 2022

Cannot say from code review, need to debug.
Probably something wrong with some querySelector or some index.

Will try to check later.

avatar Fedik
Fedik - comment - 6 Jan 2022

The answer that the js is a horror, I have made PR with updates.

avatar PhilETaylor
PhilETaylor - comment - 6 Jan 2022

The answer that the js is a horror

I have never pretended to be a professional JavaScript developer, and @dgrammatiko provided some of the code for me and I butchered it further.

avatar Fedik
Fedik - comment - 6 Jan 2022

I do not blame anyone, I just state the reason ;)

avatar PhilETaylor
PhilETaylor - comment - 6 Jan 2022

As a side note - Joomla is meant to be a content manager, but not up to 50% of the pixels on the screen, are nothing to do with the content of the page... we need to address this eventually... and depending on the screen, up to 3-4inches from the top of the page, the content now starts, this PR pushes the content even further down... this is why this toggle needs to come AFTER the content.

Screenshot 2022-01-06 at 17 53 03

avatar brianteeman
brianteeman - comment - 6 Jan 2022

@PhilETaylor can you please remove that gif as the flashing is triggering

@Fedik Thanks very much - now I just need to update it with the code to preserve the title column.

c09474c 6 Jan 2022 avatar brianteeman lint
avatar brianteeman brianteeman - change - 6 Jan 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-01-06 20:15:11
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 6 Jan 2022

Closing here - will submit as a new pr shortly

avatar brianteeman brianteeman - close - 6 Jan 2022

Add a Comment

Login with GitHub to post a comment