CuBoulder / ucb_migration_shortcodes

A module that works alongside the Shortcodes module to ease the burden of migration.
0 stars 0 forks source link

box shortcode update #54

Closed jacob-korf closed 1 month ago

jacob-korf commented 1 month ago

Closes #30. Adds a new box short code migration change. The style needs to be corrected on outlines and there is a default value of left for title positioning as this field didn't exist in D7.

timurtripp commented 1 month ago

Also please use spaces instead of tabs for indentation in the Twig file.

timurtripp commented 1 month ago

And you should do a sanity check on the values to make sure the user-supplied values are actually one of the supported ones, otherwise substitute a default. With a decade+ of content who knows what's out there.

timurtripp commented 1 month ago

My sanity check for map looked like '#size' => $size == 'small' || $size == 'medium' || $size == 'large' ? $size : 'small'. This also ensures it gets a default if they completely omitted that parameter from the shortcode.

timurtripp commented 1 month ago

Test with all style combinations to ensure they look identical.