Skip to content
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

Merged
merged 8 commits into from
Jun 16, 2022

Conversation

alexisdevtailor
Copy link
Contributor

No description provided.

@@ -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}"}>
Copy link
Collaborator

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"""
Copy link
Collaborator

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.

Copy link
Collaborator

@mxrguspxrtwork mxrguspxrtwork left a 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.

@@ -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}"}>
Copy link
Collaborator

@mxrguspxrtwork mxrguspxrtwork Jun 15, 2022

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}


defp active_btn_class(false, _, inactive_class),
do: "text-bulma-100 bg-gohan-100 #{inactive_class}"

defp set_bg_color(active, variant) do
Copy link
Collaborator

@mxrguspxrtwork mxrguspxrtwork Jun 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It is getter not setter, so function name should be get.
  2. 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}

Copy link
Collaborator

@mxrguspxrtwork mxrguspxrtwork left a 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. :)

@mxrguspxrtwork mxrguspxrtwork merged commit 85340ba into main Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants