mjordan / islandora_repository_reports

A Drupal 8 module that provides a collection of graphical reports on various aspects of an Islandora repository.
GNU General Public License v2.0
2 stars 5 forks source link

Add help/tip text for neat but not obvious features of charts #18

Closed manez closed 4 years ago

manez commented 4 years ago

Another trivial improvement suggestion, recorded for posterity: the ability to export or save charts as jpgs, in addition to the CSV, so they can be shared more easily (although screenshots already manage this just fine, thus the "trivial" tag)

mjordan commented 4 years ago

Already supported by Chart.js - if right/alt click over a chart, you get the standard browser Save image as options.

I'm thinking that maybe help text for this feature, and for the "remove items from chart" feature, could be placed together in a block or something, or even in a standard Drupal help link. What do you think?

manez commented 4 years ago

👍 We're already at two neat features that's aren't apparent from looking. I have to assume there will be more.

I think I'd be more inclined towards a block? I know it's getting to be a lot of text, but since the Drupal help links don't always lead to anything all that helpful, I find my brain glosses over them. A block with text visible in the interface makes sure that users see their options.

mjordan commented 4 years ago

OK thanks, I'll create a block.

mjordan commented 4 years ago

Text described in #16 should be included in this block.

mjordan commented 4 years ago

@manez I've put the help text in a standard block, but have discovered that the template file that the Seven admin theme ships with doesn't offer a lot of block regions. So a user's ability to place any block on the page is limited. Here is a screenshot of the block placed at the bottom of the 'Content' region:

tips

Here it is in the "Highlighted" block region:

tips2

So a block for the tips is not optimal, but because of Seven's default template more than the block system itself. I still think a block is the best option, since it allows admins to place it where they want (where they can), remove it, use the standard block role access tools, etc.

What do you think? I haven't pushed this up yet, but I can if you want to try it out.

manez commented 4 years ago

I'd like to try it out, to get a feel for where it works best (or least worst?)

mjordan commented 4 years ago

Here's how to test:

  1. Pull in the block branch: git pull origin master, then git fetch origin, then git checkout block.
  2. Clear your cache: drush cr (if you don't do this, Drupal will likely WSOD since adding the block changed the theme templates)
  3. Back in the admin GUI, go to admin > structure > Block layout, and finally be sure to click on the "Seven" tab. I spent about half an hour discovering this is a very important step!
  4. You can now add the new block, whose title is "Tips on using Islandora Repository Reports'. The only configuration required is, in the "Pages" tab of the block config, paste in /admin/reports/islandora_repository_reports.

If you want to switch back to the master branch after testing, don't forget to run drush cr immediately after doing so to avoid a template-change-induced WSOD.

Let me know how it goes. If you encounter a WSOD, try clearing the cache, it's likely related to the template changes. Thanks for your feedback and help!

manez commented 4 years ago

I tried it out, no WSOD, and after trying it in a few places, I think the bottom of Content is a pretty good spot.

mjordan commented 4 years ago

Cool, thanks. OK to merge the block branch into master and go from there?

manez commented 4 years ago

👍

mjordan commented 4 years ago

The tips block now installs and is configured automatically to appear below the charts. I've also added this to the readme, in the Configuration section: "On installation, a block containing some "tips" on using the reports is installed. If Seven is your administrative theme, this block will be placed at the bottom of the Repository Reports page."