Follow-up from "Super sidebar: Support project, group and "your work""
The following discussions from !111186 (merged) should be addressed:
-
@splattael started a discussion: Question (non-blocking)
Is
@navdefinednavhelper?🤔 Should we use
navinstead then?🤔 Also, should we move
navinto the...NavHelper?🤷 A follow-up is fine though!
-
@splattael started a discussion: Question (non-blocking) Is calling
super_sidebar_context_headera hot-spot? Do we need to ivar cache a Hash?🤷 -
@splattael started a discussion: Suggestion (nitpick / non-blocking)
We could use
flatten(1)as we don't expect deep nested arrays.However, I wonder if we could refactor this to use
concatinstead avoidingflatten:} ].concat( # All renderable menu entries renderable_items.map do |obj| item = obj.serialize_for_super_sidebar(id) active_routes = item.delete(:active_routes) item[:is_active] = active_routes ? @context.route_is_active.call(active_routes) : false item end )Not sure if performance is worth the effort though. Probably not. Non-blocking!
-
@splattael started a discussion: Observation (totally non-blocking) I feel this tree-like structure could be simplified/improved but I wasn't able to find a good solution swiftly
🤓