Repository: penpot/penpot
File: frontend/src/app/main/ui/workspace/sidebar.cljs (ClojureScript)

Code before:
        {on-pointer-down :on-pointer-down
         on-lost-pointer-capture :on-lost-pointer-capture
         on-pointer-move :on-pointer-move
         set-width :set-size
         width :size}
        (use-resize-hook :code sidebar-default-width sidebar-default-width sidebar-default-max-width :x true :right)

        on-change-section
        (mf/use-fn #(reset! current-section* %))

        on-expand
        (mf/use-fn
         (mf/deps width set-width)
         (fn []
           (set-width (if (> width sidebar-default-width)
                        sidebar-default-width
                        sidebar-default-max-width))))

        active-tokens-by-type
        (mf/with-memo [active-tokens]
          (delay (ctob/group-by-type active-tokens)))
        token-numeric-inputs? (features/use-feature "token-numeric-inputs/v1")]

    [:> (mf/provider muc/sidebar) {:value :right}
     [:> (mf/provider muc/active-tokens-by-type) {:value active-tokens-by-type}
      [:> (mf/provider muc/token-inputs) {:value token-numeric-inputs?}

       [:aside
        {:class (stl/css-case :right-settings-bar true
                              :not-expand (not can-be-expanded?)
                              :expanded (> width sidebar-default-width))

         :id "right-sidebar-aside"
         :data-testid "right-sidebar"
         :data-size (str width)
         :style {:--width (if can-be-expanded?
                            (dm/str width "px")
                            (dm/str sidebar-default-width "px"))}}

        (when can-be-expanded?
          [:div {:class (stl/css :resize-area)
                 :on-pointer-down on-pointer-down
                 :on-lost-pointer-capture on-lost-pointer-capture
                 :on-pointer-move on-pointer-move}])

        [:> right-header*
         {:file file
          :layout layout
          :page-id page-id}]

        [:div {:class (stl/css :settings-bar-inside)}

Review comment (suggestion):
I'm not clearly understand this context. I mean, this context hold the value obtained from: `(features/use-feature "token-numeric-inputs/v1")`, then the context value is used for make the conditional on measures menu.

We can use the `(features/use-feature "token-numeric-inputs/v1")` directly on the measures menu I think

Code after:
        {on-pointer-down :on-pointer-down
         on-lost-pointer-capture :on-lost-pointer-capture
         on-pointer-move :on-pointer-move
         set-width :set-size
         width :size}
        (use-resize-hook :code sidebar-default-width sidebar-default-width sidebar-default-max-width :x true :right)

        on-change-section
        (mf/use-fn #(reset! current-section* %))

        on-expand
        (mf/use-fn
         (mf/deps width set-width)
         (fn []
           (set-width (if (> width sidebar-default-width)
                        sidebar-default-width
                        sidebar-default-max-width))))

        active-tokens-by-type
        (mf/with-memo [active-tokens]
          (delay (ctob/group-by-type active-tokens)))]

    [:> (mf/provider muc/sidebar) {:value :right}
     [:> (mf/provider muc/active-tokens-by-type) {:value active-tokens-by-type}
      [:aside
       {:class (stl/css-case :right-settings-bar true
                             :not-expand (not can-be-expanded?)
                             :expanded (> width sidebar-default-width))

        :id "right-sidebar-aside"
        :data-testid "right-sidebar"
        :data-size (str width)
        :style {:--width (if can-be-expanded?
                           (dm/str width "px")
                           (dm/str sidebar-default-width "px"))}}

       (when can-be-expanded?
         [:div {:class (stl/css :resize-area)
                :on-pointer-down on-pointer-down
                :on-lost-pointer-capture on-lost-pointer-capture
                :on-pointer-move on-pointer-move}])

       [:> right-header*
        {:file file
         :layout layout
         :page-id page-id}]

       [:div {:class (stl/css :settings-bar-inside)}
        (cond
          dbg-shape-panel?
          [:> debug-shape-info*]