? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
23 May 2017

Namespace grid. Who the heck is still using this class?

After the discussion in this pr, the JGrid class will be deprecated.

avatar laoneo laoneo - open - 23 May 2017
avatar laoneo laoneo - change - 23 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2017
Category Libraries
avatar dgt41
dgt41 - comment - 23 May 2017

@laoneo actually you need to delete this file, as there is no moo tools to support the js part of this

avatar laoneo
laoneo - comment - 23 May 2017

So we deprecate it in 3 and remove it in 4?

avatar brianteeman
brianteeman - comment - 23 May 2017

NO! you cannot delete this from j3!

avatar mbabker
mbabker - comment - 23 May 2017

as there is no moo tools to support the js part of this

This class is an HTML table generator, where's the JS support?

avatar brianteeman
brianteeman - comment - 23 May 2017

If you want to see where it is used see #15831

avatar dgt41
dgt41 - comment - 23 May 2017
avatar mbabker
mbabker - comment - 23 May 2017

@brianteeman That's JHtmlGrid, different from JGrid.

avatar mbabker
mbabker - comment - 23 May 2017

And JHtmlJgrid (also, why the hell do we have 3 grid classes!?)

avatar dgt41
dgt41 - comment - 23 May 2017

Grid is important! ?

avatar brianteeman
brianteeman - comment - 23 May 2017

That's why that pr took me so long as I had to find the correct one

avatar laoneo
laoneo - comment - 23 May 2017

I guess that class is nowehere used in core. Should we deprecate it and remove it in 4. Who the hell is doing nowadays a grid with a table?

avatar mbabker
mbabker - comment - 23 May 2017

The admin list views are table based grids.

avatar dgt41
dgt41 - comment - 23 May 2017

Who the hell is doing nowadays a grid with a table?

Actually a grid class could be very handy if combined with modern tech, e.g. web components: https://www.webcomponents.org/search/grid

avatar laoneo
laoneo - comment - 23 May 2017

But this class is not used in core. So I suggest to deprecate it and remove it. Guess nobody is doing a HTML table in the admin with this class or will do a web component with it.

avatar brianteeman
brianteeman - comment - 23 May 2017

Isn't Hathor using it?

avatar dgt41
dgt41 - comment - 23 May 2017

@brianteeman we're in J4 mode here

avatar laoneo
laoneo - comment - 23 May 2017

I didn't see any reference to it in PHPStorm.

avatar dgt41
dgt41 - comment - 23 May 2017

@laoneo you can't remove it in 3.8, you can tho deprecate it and remove it in J4

avatar brianteeman
brianteeman - comment - 23 May 2017

@dgt41 we are in j3 mode here that's why the pr is for j3 not 4. So my reply was perfectly valid

avatar laoneo
laoneo - comment - 23 May 2017

@dgt41 that's what I suggest.

avatar wilsonge
wilsonge - comment - 29 May 2017

This was something Hannes did for 1.6. It does have some use cases if you want to build plugin events to add columns dynamically to list views in the backend. But we aren't using it in core. It's on my list of items to discuss over the next day or two

avatar mbabker
mbabker - comment - 2 Jun 2017

@wilsonge Did this ever get discussed?

avatar wilsonge
wilsonge - comment - 2 Jun 2017

No I never got there. I think it can be removed (i mean i know for sure it's not being used - it's just if we actually want to consider it being used or not)

avatar laoneo
laoneo - comment - 3 Jun 2017

So I'm oing to deprecate it in 3 and remove it in 4, similar to the less lib?

avatar mbabker
mbabker - comment - 3 Jun 2017

That seems fair to me.

avatar laoneo laoneo - change - 3 Jun 2017
Labels Added: ?
avatar laoneo laoneo - change - 3 Jun 2017
Title
Namespace grid
Deprecate JGrid
avatar laoneo laoneo - edited - 3 Jun 2017
avatar laoneo laoneo - change - 3 Jun 2017
The description was changed
avatar laoneo laoneo - edited - 3 Jun 2017
avatar mbabker
mbabker - comment - 3 Jun 2017

@laoneo Can you fix the PHPCS error? Then I'll merge.

ad3cb69 3 Jun 2017 avatar laoneo CS
avatar mbabker mbabker - change - 3 Jun 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-06-03 14:04:41
Closed_By mbabker
avatar mbabker mbabker - close - 3 Jun 2017
avatar mbabker mbabker - merge - 3 Jun 2017
avatar Hackwar
Hackwar - comment - 3 Jun 2017

I wrote that class several years ago with the intent of being able to make the core components extendable. The idea was to fill the objects with the respective data and in the layout files to simply do the output. Between filling the object in JView::display() and getting the actual output, a plugin event could have been used to then let plugins modify the tables. For example a search plugin could add a column to display if the content was properly indexed or not, etc.

I wrote the class, explained it exactly as I did here, rewrote a bunch of core components and the PR for JGrid was accepted. When I then proposed the PR to rewrite the core components, I was told that our users are to stupid to understand this and thus this would not be used. Several weeks of work for the dumpster. Nice.

avatar Hackwar
Hackwar - comment - 3 Jun 2017

Reminds me of the router. And the MVC classes. And lots of other stuff in this project.

Add a Comment

Login with GitHub to post a comment