Once #1782244: Convert image styles $style array into ImageStyle (extends ConfigEntity) is in, we should convert image styles to use ConfigEntityListController.
Proposed
1) introduce ImageStyleListController class
2) Remove theme_image_styles() function - not needed with new #table
3) Change path for core's default
4) Fix tests
5) Style labels should be bold links according suggestion #1814916-65: Convert menus into entities
Follow ups
Once admin-path fixed proceed with forms #1788542: Use EntityFormController and EntityListController for image styles
Comment | File | Size | Author |
---|---|---|---|
#61 | 1809376-61.patch | 11.28 KB | fubhy |
#61 | interdiff.txt | 5.31 KB | fubhy |
#59 | 1809376-59.patch | 10.63 KB | fubhy |
#55 | interdiff.txt | 3.18 KB | tte |
#55 | 1809376-imageList-55.patch | 10.47 KB | tte |
Comments
Comment #1
andypost#1588422: Convert contact categories to configuration system commited
Comment #2
andypostThis was fixed as follow-up #1782244: Convert image styles $style array into ImageStyle (extends ConfigEntity)
Remaining todo #1821848: Move image style load/update/delete operations into a new ImageStyleStorageController
Comment #3
andypostSuppose this should be fixed before #1788542: Use EntityFormController and EntityListController for image styles
We need to re-manage a style uri anyway
Comment #3.0
andypostUpdated issue summary.
Comment #4
andypostClean-up copy-paste errors
Diffstats
Comment #5
tim.plunkettSee also: #1885644: ImageStyle::uri() is broken and has no coverage
Comment #6
sunI got heavily confused by the issue titles, so let me harmonize this one with #1788542: Use EntityFormController and EntityListController for image styles
Comment #7
andypostRe-roll after #1885644: ImageStyle::uri() is broken and has no coverage
Comment #9
andypost#7: 1809376-image-list-7.patch queued for re-testing.
Comment #11
andypostSomething wrong with testbot
Comment #12
andypostNow patch is green, needs review
Comment #13
tim.plunkettCode looks great, can we see some before and after screenshots?
Comment #14
andypostActually yes! This was helpful
The only difference now that edit link points to admin/config/media/image-styles/manage/%image_style/edit
Comment #15
andypostd.o won't show this files...
Before & patch #14
After #7
Comment #16
sunCan we use #type link here?
Aside from that, this looks ready to go.
Comment #17
andypost@sun we have two different pre-render arrays for "sortable" and "renderable" tables - is there any chance|idea to unify them to have ability quickly switch between them?
Comment #18
andypostWe have to fix #1855402: Add generic weighting (tabledrag) support for config entities (DraggableListController) first
Comment #19
andypostNew patch, label changed to #type link as @sun pointed in #16
Also I added bold style as suggested in #1814916-65: Convert menus into entities
Comment #20
andypostFixed doc blocks to use full namespace
Comment #20.0
andypostUpdated issue summary.
Comment #21
andypost#20: 1809376-image-list-20.patch queued for re-testing.
Comment #22
andypostReroll for
{@inheritdoc}
Comment #23
andypostprevious patch was wrong
Comment #24
andypostas per #1872870-29: Implement a RoleListController and RoleFormController there should not be links because links "better use" for Content Entities
diffstat
Comment #25
andypostRe-roll after #1807042: Reorganizie entity storage/list/form/render controller annotation keys
Comment #26
andypostConvert to route
Comment #27
andypostMarked as duplicate #1987724: Convert image_style_list() to a new style controller
Comment #29
andypost#26: 1809376-imageList-26.patch queued for re-testing.
Comment #30
kim.pepper#26: 1809376-imageList-26.patch queued for re-testing.
Comment #31
tstoecklerConfigEntityListController currently does:
It seems that is a XSS vulnerability. So can we fix that there instead of overriding it here?
Otherwise looks good. I didn't try this out, otherwise I would RTBC.
Comment #32
andypostFiled #2019071: EntityListController::buildRow() should return secure label cos it out of scope
Comment #33
andypostThis patch holds #1788542-51: Use EntityFormController and EntityListController for image styles to introduce action links
Comment #34
andypost#32: 1809376-imageList-32.patch queued for re-testing.
Comment #36
andypostnew merge
Comment #38
andypostMaking major because of dependent #1788542-51: Use EntityFormController and EntityListController for image styles
Comment #39
dawehnerIs there a follow up issue already to convert this to a library?
Comment #40
andypostProbably there should be some meta issue to convert all #attached to library but this out of scope the issue
Also this css is not used on the list page so I reverted it back in #33 to make this conversion straight
Comment #41
andypostRe-roll with ur_generator injected, also admin.css is not needed at all here, it used only for preview?
Comment #42
andypostFix doc-block
Comment #44
andypost#42: 1809376-imageList-42.patch queued for re-testing.
Comment #45
tim.plunkettMissing @file
How is this different than the parent?
Comment #46
andypostParent should do this check after #2019071: EntityListController::buildRow() should return secure label
Comment #48
dawehnerInstead of type hinting the core url generator directly we should go with PathBasedGeneratorInterface
Comment #49
andypostYep
Comment #50
Berdir#49: 1809376-imageList-49.patch queued for re-testing.
Comment #51
dawehnerThat's perfect
Comment #52
YesCT CreditAttribution: YesCT commentedThis issue was RTBC and passing tests on July 1, the beginning of API freeze.
Comment #53
Dries CreditAttribution: Dries commentedThis shouldn't be major. As a rule, if the blockee is normal, the blocker is not automatically major -- it should be prioritized on its own merits.
Comment #54
tim.plunkettInstall this, and go to /admin/config/media/image-styles.
You won't see any operations links, because there is no access controller.
We need to expand the tests to use clickLink() instead of navigating by URL, and we need an access controller.
When the tests are written, please upload the patch with those tests without the access controller to prove it fails.
Comment #55
tte CreditAttribution: tte commentedI've extended the patch in #49 by adding an appropriate ImageStyleAccessController.
In addition, I've added a test which checks whether the user with 'administer image styles' permission can access the "Edit" link controlled by the ImageStyleAccessController using the clickLink() function.
Comment #56
Gábor HojtsyThis looks good! I know this does not use the latest in menu tab plugin technology and all that, but this also blocks adding image style support to config translation (given no alterable list operations), so this blocks #2044387: Add remaining configuration entity or page into configuration translation module which blocks #1952394: Add configuration translation user interface module in core, so it would be good to get this land.
Did I say I love we have these shared interests to have clean API implementations? :) Yay!
Comment #57
Gábor Hojtsy#55: 1809376-imageList-55.patch queued for re-testing.
Comment #58
catchNo longer applies.
Comment #59
fubhy CreditAttribution: fubhy commentedRe-roll
Comment #60
dawehnerThis should be $account->hasPermission now.
Can't we also use a translation manager?
At least this function should have a short docblock.
Comment #61
fubhy CreditAttribution: fubhy commentedComment #62
dawehner/me hides ... missing empty line.
Comment #63
tim.plunkett#1821854: Convert image effects into plugins broke this.
Comment #64
claudiu.cristeaThis interfere with #1788542: Use EntityFormController and EntityListController for image styles on local actions. Let me merge this into #1788542: Use EntityFormController and EntityListController for image styles as it easier to handle both in the same patch.
Comment #65
claudiu.cristeaI merged and reworked this patch in #1788542-58: Use EntityFormController and EntityListController for image styles because they interfere in a way that makes difficult separate patching.
Marking this as duplicate of #1788542: Use EntityFormController and EntityListController for image styles.
Comment #66
Gábor HojtsyRemoving tag.
Comment #66.0
Gábor HojtsyUpdated issue summary.