Skip to content

Commit

Permalink
fix: Miscellaneous changes (#12343)
Browse files Browse the repository at this point in the history
  • Loading branch information
surajshetty3416 committed Feb 8, 2021
1 parent 1133f40 commit 473cb16
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 90 deletions.
2 changes: 0 additions & 2 deletions .codacy.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .deepsource.toml

This file was deleted.

3 changes: 1 addition & 2 deletions .eslintignore
Expand Up @@ -5,5 +5,4 @@ frappe/core/doctype/doctype/boilerplate/*
frappe/core/doctype/report/boilerplate/*
frappe/public/js/frappe/class.js
frappe/templates/includes/*
frappe/tests/testcafe/*
frappe/www/website_script.js
frappe/www/website_script.js
File renamed without changes.
11 changes: 0 additions & 11 deletions ci/fix-mariadb.sh

This file was deleted.

22 changes: 0 additions & 22 deletions ci/my_config.h.patch

This file was deleted.

52 changes: 25 additions & 27 deletions frappe/desk/page/user_profile/user_profile_controller.js
Expand Up @@ -151,32 +151,30 @@ class UserProfile {

// eslint-disable-next-line no-unused-vars
render_percentage_chart(field, title) {
// REDESIGN-TODO: chart seems to be broken. Enable this once fixed.
this.wrapper.find('.percentage-chart-container').hide();
// frappe.xcall('frappe.desk.page.user_profile.user_profile.get_energy_points_percentage_chart_data', {
// user: this.user_id,
// field: field
// }).then(chart => {
// if (chart.labels.length) {
// this.percentage_chart = new frappe.Chart('.performance-percentage-chart', {
// type: 'percentage',
// data: {
// labels: chart.labels,
// datasets: chart.datasets
// },
// truncateLegends: 1,
// barOptions: {
// height: 11,
// depth: 1
// },
// height: 200,
// maxSlices: 8,
// colors: ['purple', 'blue', 'cyan', 'teal', 'pink', 'red', 'orange', 'yellow'],
// });
// } else {
// this.wrapper.find('.percentage-chart-container').hide();
// }
// });
frappe.xcall('frappe.desk.page.user_profile.user_profile.get_energy_points_percentage_chart_data', {
user: this.user_id,
field: field
}).then(chart => {
if (chart.labels.length) {
this.percentage_chart = new frappe.Chart('.performance-percentage-chart', {
type: 'percentage',
data: {
labels: chart.labels,
datasets: chart.datasets
},
truncateLegends: 1,
barOptions: {
height: 11,
depth: 1
},
height: 200,
maxSlices: 8,
colors: ['purple', 'blue', 'cyan', 'teal', 'pink', 'red', 'orange', 'yellow'],
});
} else {
this.wrapper.find('.percentage-chart-container').hide();
}
});
}

create_line_chart_filters() {
Expand Down Expand Up @@ -452,4 +450,4 @@ class UserProfileTimeline extends BaseTimeline {
}

frappe.provide('frappe.ui');
frappe.ui.UserProfile = UserProfile;
frappe.ui.UserProfile = UserProfile;
3 changes: 2 additions & 1 deletion frappe/public/scss/desk/css_variables.scss
Expand Up @@ -24,6 +24,7 @@ $input-height: 28px !default;
--fg-hover-color: var(--gray-100);
--card-bg: var(--fg-color);
--disabled-text-color: var(--gray-700);
--disabled-control-bg: var(--gray-50);
--control-bg: var(--gray-100);
--control-bg-on-gray: var(--gray-200);
--awesomebar-focus-bg: var(--fg-color);
Expand Down Expand Up @@ -56,4 +57,4 @@ $input-height: 28px !default;
--timeline-item-bottom-margin: var(--margin-sm);
--timeline-content-max-width: 700px;
--timeline-left-padding: calc(var(--padding-xl) + var(--timeline-item-icon-size) / 2);
}
}
4 changes: 2 additions & 2 deletions frappe/public/scss/desk/form.scss
Expand Up @@ -91,7 +91,7 @@
padding: 8px 12px;
cursor: default;
color: var(--disabled-text-color);
background-color: var(--control-bg);
background-color: var(--disabled-control-bg);
}

.form-control:disabled, .form-control[readonly] {
Expand Down Expand Up @@ -297,4 +297,4 @@
font-feature-settings: "tnum" 1;
margin-top: 0px;
}
}
}
8 changes: 2 additions & 6 deletions frappe/public/scss/desk/global_search.scss
Expand Up @@ -89,16 +89,12 @@
.result {
@include flex(flex, null, center, null);
padding: 8px 0;
color: var(--gray-800);
color: var(--text-light);

.result-image {
margin-right: var(--margin-sm);
}

a {
color: var(--gray-800);
}

mark {
display: inline-flex;
padding: 0;
Expand All @@ -121,4 +117,4 @@
padding-bottom: var(--padding-xs);
}
}
}
}

0 comments on commit 473cb16

Please sign in to comment.