-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix the Sidebar/Left Menu styling and align with React [MDS-107] #290
Conversation
lib/moon/autolayouts/top_to_down.ex
Outdated
@@ -9,7 +9,7 @@ defmodule Moon.Autolayouts.TopToDown do | |||
|
|||
def render(assigns) do | |||
~F""" | |||
<div class={"flex flex-col gap-#{@gap} #{@gap} #{@class}"}> | |||
<div class={"flex flex-col #{@gap} #{@gap} #{@class}"}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 gaps?
prop height, :number, default: 24 | ||
|
||
def render(assigns) do | ||
~F""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put this to separate SVG file - otherwise caching etc does not work.
Because LiveViews are server side rendered, each time something changes, this means a lot more network traffic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
Please check small proposals how to improve.
lib/moon/autolayouts/top_to_down.ex
Outdated
@@ -9,7 +9,7 @@ defmodule Moon.Autolayouts.TopToDown do | |||
|
|||
def render(assigns) do | |||
~F""" | |||
<div class={"flex flex-col gap-#{@gap} #{@gap} #{@class}"}> | |||
<div class={"flex flex-col #{@gap} #{@class}"}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{"flex flex-col", @gap, @class}
lib/moon/components/chip.ex
Outdated
|
||
defp active_btn_class(false, _, inactive_class), | ||
do: "text-bulma-100 bg-gohan-100 #{inactive_class}" | ||
|
||
defp set_bg_color(active, variant) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It is getter not setter, so function name should be get.
- let's please use standard surface class namings:
So bad style "some class list #{some_function(a, b)}"
Good style class={"class list", get_class(a, b), "more classes": c && d}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good updates! Sorry, few ideas more. :)
No description provided.