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

PLIP: Cleanup and enhance icon and thumb aspects #1734

Closed
16 tasks done
fgrcon opened this issue Aug 30, 2016 · 98 comments
Closed
16 tasks done

PLIP: Cleanup and enhance icon and thumb aspects #1734

fgrcon opened this issue Aug 30, 2016 · 98 comments

Comments

@fgrcon
Copy link
Member

fgrcon commented Aug 30, 2016

Proposer : fgrcon

Seconder : Jens W. Klein

Abstract

Pre plone 5 icons to decorate content types were implemented using tags. Since plone 5 these image tags have been replaced by fontello fonts in css rules (:before{content=\e80...} ). Furthermore mimetype icons where used for file types such as *.pdf, *.xls and many more until plone 4.x. - in plone 5 all those are replaced by a single fontello font (paper clip).

There has been some confusion about icons and preview images (aka thumbs). In summary views thumbs were shown for objects containing a lead image. In plone 5.02 the option to show thumbs in further list and table views, folder content listing , portlets etc. was added.

Configurability of this feature (where to show thumbs, where to suppress them, individual thumb size ) is insufficient (only never, authenticated users only, always).

The implementation of this feature reuses an obsolete meta data catalog item: getIcon (now bool: True when item is an image cor contains an image (e.g. lead image) - this adds to the confusion between thumbs and icons enormously.

Concise but sufficient documentation (user and developer) is to be provided.

Motivation

Cleanup, better usabilty, make life easier for users, integrators, developers.
get same behavior, look and feel allover the framework

Assumptions

see abstract

Proposal & Implementation

- [ ] change meta-data name getIcon to hasImage (keep getIcon with deprecation warning for a while ?)
This should be moved to an independent PLIP beacause it needs further discussion. Renaming this metadata item might generate unacceptable effort for reindexing or cause problems for add ons.
Maybe just to be solved with explanations in documentation.

  • provide more detailed options in Site Control panel (Suppress thumbs in list views, table views, summary view, portlets, default thumbsizes for list-, table-, summary- views and portlets.
    site-settings
  • Additional behavior IThumbIconHandling (in p.a.contenttypes) for dexterity types, which allow to override thumb and icon options for folders and collections and custom types.
    This Behavior is added to folder and collection by default. (see comment by @ebrehault below, explanations will go into documentation ....)
    editfolder
  • make thumbsize configurable in folder contents (structure pattern)
  • add override thumb and icon options to all standard portlets in plone.app.portlets, ...collection, ...event :
    • navigation
    • news
    • revision
    • recent
    • plone.portlet.collection
    • plone.app.event

for all listed portlets:
nav-portlet

  • remove fontello font (paper clip) for file types and replace with mime type icon (to many mimetypes to create fontello fonts for each of them)

before e.g.:
tableview-before

after:
tableview-after

  • documentation for all stakeholders (covering metadata, icons, thumb aspects)
    WIP will be submitted after prs are merged

  • upgradesteps to reapply profiles ( new Registry records, add IThumbHandling behavior to dx folder and collection )

  • plone-compile-resources

  • some additional translations

    remove dead code as much as possible :

  • plone.app.layout

  • Products.CMFPlone

Deliverables

finished:

  • Products.CMFPlone
  • plone.app.content
  • mockup (structure)
  • plone.app.contentlisting
  • plone.app.contenttypes
  • plone.app.layout
  • plone.app.portlets
  • plone.portlet.collection
  • plone.app.event
  • plone.documentation
  • plone.theme.barceloneta
  • plone.app.upgrade

Risks

- renaming getIcon might cause troubles for addons
postponed see above..

  • some test cases might need rework

Participants

fgrcon

most of the neccessary modifications are already implemented and tested in private environment. Pull requests will follow shortly.

Related issues

Pull Requests

branchname: plip1734thumbs https://github.com/plone/buildout.coredev/tree/plip1734thumbs

@fgrcon fgrcon added this to the Future milestone Aug 30, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Aug 31, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Aug 31, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Sep 1, 2016
fgrcon added a commit to plone/plone.app.content that referenced this issue Sep 1, 2016
  (uses site control panel settings: thumb_size_tables ...)
  plone/Products.CMFPlone#1734

Conflicts:
	plone/app/content/browser/contents/templates/rename.pt
fgrcon added a commit to plone/plone.app.content that referenced this issue Sep 1, 2016
fgrcon added a commit to plone/mockup that referenced this issue Sep 1, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Sep 1, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Sep 1, 2016
@fgrcon
Copy link
Member Author

fgrcon commented Sep 1, 2016

fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Sep 2, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Sep 2, 2016
fgrcon added a commit to plone/plone.portlet.collection that referenced this issue Sep 2, 2016
@fgrcon
Copy link
Member Author

fgrcon commented Sep 3, 2016

fgrcon added a commit to plone/plone.app.content that referenced this issue Sep 21, 2016
fgrcon added a commit to plone/mockup that referenced this issue Sep 21, 2016
fgrcon added a commit to plone/plone.app.contentlisting that referenced this issue Oct 2, 2016
fgrcon added a commit to plone/plonetheme.barceloneta that referenced this issue Oct 2, 2016
fgrcon added a commit to plone/plonetheme.barceloneta that referenced this issue Oct 2, 2016
fgrcon added a commit to plone/plone.app.contentlisting that referenced this issue Oct 2, 2016
@fgrcon
Copy link
Member Author

fgrcon commented Jun 1, 2017

@ebrehault @jensens @gforcada ....
finished
jenkins jobs in queue: http://jenkins.plone.org/job/plip-1734-icons-and-thumbs/5/
http://jenkins.plone.org/job/pull-request-5.1/134/

@ebrehault
Copy link
Member

Tests are green :)
@jensens @gforcada shall we merge?

@rnixx
Copy link
Member

rnixx commented Jun 1, 2017

fgrcon opened this Issue on 30 Aug 2016

well deserved

🥇

@gforcada
Copy link
Member

gforcada commented Jun 1, 2017

@fgrcon as this is for 5.1 only, I would say yes, let's merge now 👍

@jensens
Copy link
Member

jensens commented Jun 1, 2017

Yes, ready for merge!

@svx
Copy link
Member

svx commented Jun 1, 2017

I guess plone/documentation#809 should be merged, too ?

mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Jun 1, 2017
Branch: refs/heads/master
Date: 2017-04-05T08:33:54+02:00
Author: Franz Gerhard Reinisch (fgrcon) <[email protected]>
Commit: plone/plone.app.contentlisting@0d39e69

 provide Mimetype icon path for file types in contentlisting object
 plone/Products.CMFPlone#1734

Files changed:
M CHANGES.rst
M plone/app/contentlisting/contentlisting.py
M plone/app/contentlisting/interfaces.py
Repository: plone.app.contentlisting
Branch: refs/heads/master
Date: 2017-04-05T08:36:32+02:00
Author: root (fgrcon) <[email protected]>
Commit: plone/plone.app.contentlisting@5dfdafc

update documentation

Files changed:
M CHANGES.rst
M README.rst
Repository: plone.app.contentlisting
Branch: refs/heads/master
Date: 2017-04-07T13:10:25+02:00
Author: root (fgrcon) <[email protected]>
Commit: plone/plone.app.contentlisting@8c96169

catch attribute error

Files changed:
M plone/app/contentlisting/contentlisting.py
Repository: plone.app.contentlisting
Branch: refs/heads/master
Date: 2017-04-14T13:29:07+02:00
Author: root (fgrcon) <[email protected]>
Commit: plone/plone.app.contentlisting@17a8deb

review findings worked in, removed api, use mime_type column, pep8 ....

Files changed:
M plone/app/contentlisting/contentlisting.py
Repository: plone.app.contentlisting
Branch: refs/heads/master
Date: 2017-06-01T14:13:04+02:00
Author: Eric BREHAULT (ebrehault) <[email protected]>
Commit: plone/plone.app.contentlisting@f0b255d

Merge pull request #19 from plone/plip1734thumbs

Plip1734thumbs

Files changed:
M CHANGES.rst
M README.rst
M plone/app/contentlisting/contentlisting.py
M plone/app/contentlisting/interfaces.py
@ebrehault
Copy link
Member

@fgrcon there is a confict here plone/plone.app.content#106, could you have a look?

@ebrehault
Copy link
Member

@svx yes I did merge it

@svx
Copy link
Member

svx commented Jun 1, 2017

@ebrehault awesome ! thanks !!!!

mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Jun 1, 2017
Branch: refs/heads/master
Date: 2017-04-13T17:40:18+02:00
Author: Franz Gerhard Reinisch (fgrcon) <[email protected]>
Commit: plone/plone.app.content@7eadd9d

make thumb size in folder contents listing adjustable/supressable
  (uses site control panel settings: thumb_size_tables ...)
  clean up deprecated icon related code
  replace paperclip icon with mime type icons
  plone/Products.CMFPlone#1734

Files changed:
M CHANGES.rst
M plone/app/content/browser/contents/__init__.py
M plone/app/content/browser/templates/select_default_page.pt
M plone/app/content/browser/vocabulary.py
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-04-13T17:40:23+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/plone.app.content@da1748f

fix ReST

Files changed:
M CHANGES.rst
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-04-14T12:51:42+02:00
Author: root (fgrcon) <[email protected]>
Commit: plone/plone.app.content@a9f158c

 review fixes, pep8

Files changed:
M plone/app/content/browser/contents/__init__.py
M plone/app/content/browser/vocabulary.py
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-06-01T14:19:10+02:00
Author: Eric BREHAULT (ebrehault) <[email protected]>
Commit: plone/plone.app.content@da05598

Merge branch 'master' into plip1734thumbs

Files changed:
M CHANGES.rst
M MANIFEST.in
M plone/app/content/tests/test_namechooser_unit.py
M setup.py
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-06-01T14:19:20+02:00
Author: Eric BREHAULT (ebrehault) <[email protected]>
Commit: plone/plone.app.content@d39ccd3

Merge pull request #106 from plone/plip1734thumbs

make thumb size in folder contents listing adjustable/supressable

Files changed:
M CHANGES.rst
M plone/app/content/browser/contents/__init__.py
M plone/app/content/browser/templates/select_default_page.pt
M plone/app/content/browser/vocabulary.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Jun 1, 2017
Branch: refs/heads/master
Date: 2017-04-13T17:40:18+02:00
Author: Franz Gerhard Reinisch (fgrcon) <[email protected]>
Commit: plone/plone.app.content@7eadd9d

make thumb size in folder contents listing adjustable/supressable
  (uses site control panel settings: thumb_size_tables ...)
  clean up deprecated icon related code
  replace paperclip icon with mime type icons
  plone/Products.CMFPlone#1734

Files changed:
M CHANGES.rst
M plone/app/content/browser/contents/__init__.py
M plone/app/content/browser/templates/select_default_page.pt
M plone/app/content/browser/vocabulary.py
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-04-13T17:40:23+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/plone.app.content@da1748f

fix ReST

Files changed:
M CHANGES.rst
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-04-14T12:51:42+02:00
Author: root (fgrcon) <[email protected]>
Commit: plone/plone.app.content@a9f158c

 review fixes, pep8

Files changed:
M plone/app/content/browser/contents/__init__.py
M plone/app/content/browser/vocabulary.py
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-06-01T14:19:10+02:00
Author: Eric BREHAULT (ebrehault) <[email protected]>
Commit: plone/plone.app.content@da05598

Merge branch 'master' into plip1734thumbs

Files changed:
M CHANGES.rst
M MANIFEST.in
M plone/app/content/tests/test_namechooser_unit.py
M setup.py
Repository: plone.app.content
Branch: refs/heads/master
Date: 2017-06-01T14:19:20+02:00
Author: Eric BREHAULT (ebrehault) <[email protected]>
Commit: plone/plone.app.content@d39ccd3

Merge pull request #106 from plone/plip1734thumbs

make thumb size in folder contents listing adjustable/supressable

Files changed:
M CHANGES.rst
M plone/app/content/browser/contents/__init__.py
M plone/app/content/browser/templates/select_default_page.pt
M plone/app/content/browser/vocabulary.py
@ebrehault
Copy link
Member

@fgrcon actually it was just a small this in CHANGES, I fixed it with the Github interface :)

So we are done !!!
Congrats @fgrcon, your efforts are very appreciated!

@fgrcon
Copy link
Member Author

fgrcon commented Jun 1, 2017

Thanks !!

@gforcada
Copy link
Member

gforcada commented Jun 2, 2017

@fgrcon so what's your next PLIP going to be 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment