fix: issues shared by frappe team's initial review

fixed issues shared in comment
- Refresh Icon Title ( also added safe guard to strip es prefix )
- changed card shadow variable to more subtle shadow
- reduced padding for padding-sm variable
- removed fixed height which caused overflow of long content for class like-disabled-input
- changed frappe-card box-shadow to border to have more flat look
- added green color back to avatar
- changed form-section-description text size as per new text-size
- fixed double scrollbar issue in notification list
This commit is contained in:
Maharshi Patel 2023-08-25 19:10:53 +05:30
parent 30446ae73d
commit 3dc3872dfc
9 changed files with 40 additions and 20 deletions

View file

@ -230,9 +230,14 @@ frappe.views.BaseList = class BaseList {
$secondary_action.addClass("visible-xs");
}
} else {
this.refresh_button = this.page.add_action_icon("es-line-reload", () => {
this.refresh();
});
this.refresh_button = this.page.add_action_icon(
"es-line-reload",
() => {
this.refresh();
},
"",
__("Reload List")
);
}
}

View file

@ -212,9 +212,7 @@ frappe.ui.Page = class Page {
let is_sidebar_visible = $(sidebar_wrapper).is(":visible");
sidebar_toggle_icon.html(
frappe.utils.icon(
is_sidebar_visible
? "es-line-sidebar-collapse"
: "es-line-sidebar-expand",
is_sidebar_visible ? "es-line-sidebar-collapse" : "es-line-sidebar-expand",
"md"
)
);
@ -230,11 +228,20 @@ frappe.ui.Page = class Page {
${frappe.utils.icon(icon)}
</button>
`);
// ideally, we should pass tooltip_label this is just safe gaurd.
if (!tooltip_label) {
if (icon.startsWith("es-")) {
icon = icon.replace("es-line-", "");
icon = icon.replace("es-solid-", "");
icon = icon.replace("es-small-", "");
}
tooltip_label = frappe.unscrub(icon);
}
button.appendTo(this.icon_group.removeClass("hide"));
button.click(click);
button
.attr("title", __(tooltip_label || frappe.unscrub(icon)))
.attr("title", __(tooltip_label))
.tooltip({ delay: { show: 600, hide: 100 }, trigger: "hover" });
return button;

View file

@ -89,10 +89,15 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
set_default_secondary_action() {
this.refresh_button && this.refresh_button.remove();
this.refresh_button = this.page.add_action_icon("es-line-reload", () => {
this.setup_progress_bar();
this.refresh();
});
this.refresh_button = this.page.add_action_icon(
"es-line-reload",
() => {
this.setup_progress_bar();
this.refresh();
},
"",
__("Reload Report")
);
}
get_no_result_message() {

View file

@ -6,7 +6,7 @@ $disabled-input-height: 22px;
--brand-color: var(--primary);
--padding-xs: 5px;
--padding-sm: 8px;
--padding-sm: 6px;
--padding-md: 15px;
--padding-lg: 20px;
--padding-xl: 30px;
@ -21,7 +21,7 @@ $disabled-input-height: 22px;
--modal-shadow: var(--shadow-md);
--card-shadow: var(--shadow-2xl);
--card-shadow: var(--shadow-sm);
--btn-shadow: var(--shadow-xs);

View file

@ -18,7 +18,6 @@
font-size: var(--text-sm);
}
min-height: var(--input-height);
height: var(--input-height);
font-weight: var(--weight-regular);
border-radius: var(--border-radius-sm);
padding: var(--disabled-input-padding);
@ -28,7 +27,7 @@
}
.head-title {
font-size: var(--text-lg);
font-size: var(--text-xl);
font-weight: 700;
color: var(--heading-color);
}

View file

@ -28,6 +28,8 @@ html, body {
.frappe-card {
@include card();
box-shadow: none;
border: 1px solid var(--gray-300);
}
.frappe-control[data-fieldtype="Select"].frappe-control[data-fieldname="color"] {
@ -56,7 +58,6 @@ html, body {
/* for Chrome */
-webkit-appearance: none;
padding-top: 3px;
}
.select-icon {

View file

@ -12,8 +12,11 @@
--blue-avatar-bg: var(--blue-50);
--blue-avatar-color: var(--blue-500);
--green-avatar-bg: var(--green-100);
--green-avatar-color: var(--green-500);
--green-avatar-bg: var(--green-200);
--green-avatar-color: var(--green-700);
--dark-green-avatar-bg: var(--green-200);
--dark-green-avatar-color: var(--green-700);
--red-avatar-bg: var(--red-50);
--red-avatar-color: var(--red-500);

View file

@ -36,7 +36,7 @@
.form-section-description {
margin-bottom: 10px;
font-size: var(--text-xl);
font-size: var(--text-base);
color: var(--gray-900);
}

View file

@ -62,7 +62,7 @@
.notification-list-body {
// margin: 10px 0px;
max-height: 500px;
max-height: 450px;
overflow-y: auto;
.panel-events, .panel-notifications {