- Issue created by @reszli
- Merge request !49Issue #3344254: When multiple rocketship carousel sections are present, the first section's settings will be applied to all of them β (Merged) created by reszli
- Status changed to Needs work
almost 2 years ago 10:22am 27 February 2023 - π΅π±Poland sandboxpl Poland π΅π±
The approach looks good to me, I just have one observation:
+ use Drupal\Component\Utility\Random;
+ $random = new Random(); + $key = $random->string('10', TRUE); + $build['#attached']['drupalSettings']['rocketshipUI_layout_carousel'][$key] = $this->configuration; + $build['#attributes']['data-carousel-id'] = $key;
To me Random.php seems to be quite heavy to generate IDs,
maybe we could replace it withHtml::getUniqueId
:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util...it's also using static cache and ensures that we generate unique ID per single page scope
- First commit to issue fork.
-
webfordreams β
committed 00b4f440 on 6.1.x authored by
reszli β
Issue #3344254: When multiple rocketship carousel sections are present,...
-
webfordreams β
committed 00b4f440 on 6.1.x authored by
reszli β
- Status changed to Fixed
8 months ago 11:12am 7 May 2024 -
webfordreams β
committed 00b4f440 on 6.2.x authored by
reszli β
Issue #3344254: When multiple rocketship carousel sections are present,...
-
webfordreams β
committed 00b4f440 on 6.2.x authored by
reszli β
Automatically closed - issue fixed for 2 weeks with no activity.