Bug #62928

Epic #62041: twbs Bootstrap backend, refactor EXT:t3skin and HTML5 output

Feature #62332: User settings as modal-view

Feature #62166: Rework Toolbar / Topbar as bootstrap

Toolbar PHP side

Added by Christian Kuhn over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-11-13
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Wouter pushed a first patch set at https://review.typo3.org/#/c/34034/ to refactor the PHP side of Toolbar that generates the html structure in BackendController. This was reviewed by lolli leading to some architectural goals and decisions.

The bigger plan:

  • ToolbarItemHookInterface will be dropped from 7 and NOT be used anymore. Extensions currently using this interface will NOT be supported and will not get their item rendered anymore.
  • Naming:
    • "Toolbar" is the whole thing on the top right of the backend
    • "Toolbaritem" is one element in the toolbar
    • "Toolbar drop down" is an (optional) menu that may unfold
  • New interface: Toolbaritem
    [DONE] getPriority() or getPosition() (number 0...100): 0 is left, 100 is right, LiveSearch would return 90 to be "most right"
    [DONE] hasDropDown() TRUE if the toolbar item has a drop down
    [DONE] getToolbaritemContent() return html, wrapped by BackendController in a div
    [DONE] getDropDownContent() return html, wrapped by BackendController in a div
    [DONE] $backendReference / $parent should NOT be given as instance to each item (loose coupling) - there is either a getJavaScriptFiles() and getCssFiles() in the interface, or PageRenderer is given to the item classes, or item classes can get PageRenderer on their own
    Some method to find out if item should be rendered at all? eg. sys_action only shows up if there are queries to show
  • [DONE] BackendController will add a unique css id to each item based on the Toolbaritem classname
  • It would be preferred if a method like checkAccess() is NOT needed for the items interface, the maybe the "special" tca group item allowing access control could be extended to implement access control for toolbar (similar to module menu)
  • The new interface is NOT carved in stone in 7.0 and may change during 7 development
  • [DONE DIFFENTLY] Toolbaritem auto registration: If an extension finds a file in Classes/Backend/Toolbaritems, it will find and load it and will throw an exception if the class does not implement the interface.
  • ModuleMenu items and Toolbar are somehow similar - it may happen that both are merged in an unique php interface later, this is still unknown however.
  • Create .rst documentation

Subtasks

Task #62929: Initial refactoring of toolbar itemsClosed

Bug #62939: Toolbar: Bring back styling for new HTMLClosed

Task #62959: Toolbar item registration and positionClosed

Bug #62964: Rename getDropdown to hasDropDownClosed

Task #62997: ToolbarItem interface improvementsClosed

Task #63110: Clean up OpendocsToolbarItem referencesClosed

Task #63431: Documentation of new interfaceClosed

Associated revisions

Revision b86f0302 (diff)
Added by Christian Kuhn over 5 years ago

[!!!][TASK] Clean up OpendocsToolbarItem references

With toolbar refactoring, OpendocsController was renamed
to OpendocsToolbarItem and a class alias was introduced to
cope with core internal usages of the old class names. This
is cleaned up with this patch.

The class was still referenced in alt_doc_nodoc.php entry
point through EditDocumentController. This ancient code is
obsolete since around 4.3 but was never removed. The patch
now removes this entry point and redirects to dummy.php in
EditDocumentController just in case this code snippet is
still triggered somehow - which is unlikely, but can not be
overseen currently.

Furthermore, the alias OpendocsController is removed: The
new class implements a different interface now, so this
would break anyway - which is also unlikely to be used by
third party code.

Change-Id: Iaa5a7be7ef0e50c1ca1aca245c163e7bc5790410
Resolves: #63110
Related: #62928
Releases: master
Reviewed-on: http://review.typo3.org/34409
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Christian Kuhn over 5 years ago

  • Description updated (diff)

#2 Updated by Christian Kuhn over 5 years ago

https://review.typo3.org/#/c/34034/ - wouter version

https://review.typo3.org/#/c/33269/ - first felix version

Next steps: The toolbar refactoring currently blocks other patches during #koppsrpint. the wouter codeline will be adapted to not contain the old interface anymore and will then be merged quickly. the above points will be changed is smaller steps next days.

#3 Updated by Markus Klein over 5 years ago

I would prefer to have the classes in Classes/Backend/Toolbar to not conflict with existing code which is in the Classes folder already. (the content of this folder is rather unstructured up to now)

#4 Updated by Christian Kuhn over 5 years ago

  • Description updated (diff)

#5 Updated by Christian Kuhn over 5 years ago

good point with classes/backend/toolbar ... adapted :)

#6 Updated by Christian Kuhn over 5 years ago

  • Description updated (diff)

#7 Updated by Christian Kuhn over 5 years ago

  • Description updated (diff)

#8 Updated by Christian Kuhn over 5 years ago

  • Description updated (diff)

#9 Updated by Felix Kopp over 5 years ago

Done?

#10 Updated by Felix Kopp over 5 years ago

  • Status changed from New to Needs Feedback

@lolli Done?

#11 Updated by Christian Kuhn over 5 years ago

The permission stuff is still missing and the interface is marked that this specific area is likely to chance, still.

#12 Updated by Felix Kopp over 5 years ago

How can we close the issue - how can I support?
This issue is the last in line for the topbar.

Would be great to close the epic.
Thanks!!

#13 Updated by Christian Kuhn over 5 years ago

  • Status changed from Needs Feedback to Closed

Ok, closed. We'll do the permission stuff with an own ticket, later.

Also available in: Atom PDF