Skip to content
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

Add Hide Table Columns for categories and images #45

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

MrMusic
Copy link
Member

@MrMusic MrMusic commented Oct 10, 2022

Since joomla 4.2 there is a nice feature to hide any column in the table views: joomla/joomla-cms#36591

@szepty-ziemi had already suggested the implementation at the last online meeting.
Surprisingly, the implementation in the JoomGallery was very simple.
Used for categories and images view because in tags and configuration view there are only a few columns.

@MrMusic MrMusic added the needs testing This issue or pull request needs further testing label Oct 10, 2022
@szepty-ziemi
Copy link
Collaborator

ENV: https://prnt.sc/uVfTvuEhFb4v

  1. Dropdown column list causes to scroll bar to appear on the image/categories list
  • go to image / category manager
  • click column button

RESULT

  • dropdown cause scrollbar to appear

EXPECTED RESULT

  • dropdown should appear and be visible, no scrollbar displayed

obraz

Issue do not appear if there is enough items on the list, and list is longer than dropdown.

obraz

@szepty-ziemi
Copy link
Collaborator

szepty-ziemi commented Oct 11, 2022

ENV: https://prnt.sc/uVfTvuEhFb4v

  1. There is unnamed checkbox for list item checkbox column. It apply to image column
  • just click on column selector to display dropdown

obraz

Issue apply to both Image and Category manager. Maybe we should have this column named in the list header (No sorting is needed here)?

@szepty-ziemi
Copy link
Collaborator

While testing on Windows, I encountered issue right after installation.

  • Install JG package
  • go to Image Manager or Category manager

Only those two places are affected. All other e.g Configuration Manager are ok.

obraz

ENV: https://prnt.sc/5YN3u5ANetf7

@szepty-ziemi szepty-ziemi added Windows testing done and removed needs testing This issue or pull request needs further testing labels Oct 11, 2022
@MrMusic
Copy link
Member Author

MrMusic commented Oct 11, 2022

Maybe we should have this column named in the list header (No sorting is needed here)?

Done.

While testing on Windows, I encountered issue right after installation.

I cannot reproduce this. Did you perform a new installation after deinstallation?

@MrMusic
Copy link
Member Author

MrMusic commented Oct 12, 2022

  1. Dropdown column list causes to scroll bar to appear on the image/categories list

This effect is due to the fact that other classes are currently used in JoomGallery than in the corresponding Joomla views. I don't know if this is intentional?
Now i changed the classes for the images and categories view so that it is the same as in the Joomla views.
Maybe this will have any negative effect?

@MrMusic
Copy link
Member Author

MrMusic commented Oct 14, 2022

Only those two places are affected. All other e.g Configuration Manager are ok.

obraz

The only possible reason for me: You are not using Joomla 4.2.x but an older version.

@szepty-ziemi
Copy link
Collaborator

@MrMusic BINGO! That was the source of issue. Upgraded to latest version and issue was gone.

@szepty-ziemi
Copy link
Collaborator

I confirm that latest commit was tested on both Linux and Windows. Everything works and looks good.

<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<table class="table" id="categoryList">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reason for removing the "table-striped" class?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the div with class "table-responsive" I would leave there anyway. In that way there is a horizontal scroll bar if to many rows are visible for the current screen width.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the classes so that it is the same as in Joomla.
The missing scrollbars are actually a disadvantage here.
Now i have reversed it.

@Elfangor93
Copy link
Member

Now i changed the classes for the images and categories view so that it is the same as in the Joomla views.
Maybe this will have any negative effect?

@MrMusic Since you are changing only the template files of images and category manager, I can not see any negative side effects except for the fact that it is displayed differently as the first implementation was suggested.

@MrMusic
Copy link
Member Author

MrMusic commented Oct 25, 2022

ENV: https://prnt.sc/uVfTvuEhFb4v

Dropdown column list causes to scroll bar to appear on the image/categories list

go to image / category manager
click column button

RESULT

dropdown cause scrollbar to appear

EXPECTED RESULT

dropdown should appear and be visible, no scrollbar displayed

Sorry, the fix also prevented the horizontal scrollbars from appearing. so i had to reverse it.

@Elfangor93 Elfangor93 merged commit 20c1106 into JoomGalleryfriends:main Nov 10, 2022
@MrMusic MrMusic deleted the Add-hide-table-columns branch March 10, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants