2: 2
4: 2
Simple Gallery worked, some ui style fixes were required.
Grand Gallery/blocks from Block Builder didnāt work at all and fixes were required (that was expected though because they are much more complicated).
I have update all my marketplace packages for c5.9 (they are waiting for release in public/private repos).
I updated them when RC3 was available. If something was fixed/changed in RC4 or later I will just make changes when 9.0 will be released.
I have decided to not support c5.7/c5.8 with latests version of packages and set minimum requirement to 9.0.
Transition from bootstrap3 to bootstrap5 sounded like something that is not 100% backwards compatible (although I still very much appreciate moving to b5).
Grand gallery update example:
- File/folder list filtering backward compatibility
$list->sortByNodeName();
had to be replaced with
$list->getQueryObject()->orderBy('name', 'asc');
and
$list->sortBy('folderItemModified', 'asc');
with
$list->sortBy('dateModified', 'asc');
-
Extracting css icon class names.
In c5.8 css classes can be extracted from variables.less file.
Obviously in c5.9 there is no such thing, so I copied list from:
\Concrete\Block\Feature\Controller::getIconClasses()
It would be much nicer if that list was actually stored in separate class (or at least just make it public) so I donāt need to manually copy it every time it is updated.
-
Selectize was removed from core so I had to downloaded it manually and use as external dependency.
I donāt know if there is core replacement for it, but multi-select plugin (select2, slimselect or similar) is a must-have for me when dealing with stuff like tags.
-
I had some problems with my custom code of font icon picker but I donāt remember solution. But I guess it was expected to break.
-
As people mentioned earlier tabs are a mess.
I had more problems with them than I would expect.
Still I am not sure what is proper way to tackle them and what direction core is heading (best word would be āconfusedā)
In Grand Gallery I changed names in $app->make(āhelper/concrete/uiā)->tabs() helper and added custom css for hiding non-active tab-panes (display none/block).
In Block Builder/Simple Gallery I decided to just go full b5 style (ātab-contentā wrapper and ātab-paneā for actual content).
At this point everything works, but of course there are still some glaring ui styling bugs
- Form helper \Concrete\Core\Form\Service\Form ($form->select() etc.)
is not fully backwards-compatible.
In c5.8 adding custom class would just add them to the list of existing clasess.
In c5.9 adding any class to input overrides class list, so for example I had to add manually āform-selectā everywhere:
from:
<?php echo $form->select($view->field('galleryType'), $galleryTypes, $galleryType, ['class' => 'gallery-type js-gallery-type']); ?>
to:
<?php echo $form->select($view->field('galleryType'), $galleryTypes, $galleryType, ['class' => 'gallery-type js-gallery-type form-select']); ?>
If I donāt add any class, āform-selectā will be added automatically and input will by styled properly.
This behaviour caused most eyesore styling bugs in my addons, because I often add custom classes to inputs.
- Manually activating file selector using js.
concreteFileSelector() function has been removed, which is a surprise for me because concretePageSelector() still works.
Anyway i just replaced:
var activateFileSelectors = function(parentContainer) {
var fileSelectors = parentContainer.find('.js-file-selector');
fileSelectors.each(function(i, item) {
var inputName = $(item).attr('data-input-name');
var fID = parseInt($(item).attr('data-file-id'));
$(item).concreteFileSelector({'inputName': inputName, 'filters': [], 'fID': fID});
});
};
with
var activateFileSelectors = function(uniqueID, position) {
Concrete.Vue.activateContext('cms', function (Vue, config) {
new Vue({
el: 'div[data-concrete-file-input="js-file-selector-'+uniqueID+'-'+position+'"]',
components: config.components
})
})
};
- Random thoughts about b3=>b5 backward compatibility
a) I would probably add some backward compatibility for input groups (I used them quite a lot).
b) Deprecated stuff like wells are ātake it or leave itā for me, I would just style them by myself.
c) Bootstrap3 checkboxes look fine (though I think they donāt look exactly the same as proper botstrap5 checkboxes) .
d) B3=>B5 transition upped css breakpoints on level up, so thatās not something that can be fixed, but I think impact is quite minimal.
e) I had some ābtn-defaultā classes which I had to replace with ābtn-secondaryā (another backward compatibility candidate).
f) You can add backward compatibility for pull-right/pull-left
g) Bunch of icons were missing, I had to replace them with proper āFont Awesome 5 Freeā classes.
h) Grand Gallery is private repo, but you can see what I have changed in commit history of free addons:
Keep in mind I donāt plan to make latest versions of addons compatible with c5.8/c5.7.
And for statistic funsies, this is the time I devoted to updating them to c5.9:
Grand gallery: 16 hours
Block builder: 20 hours
Simple gallery: 1,5 hour