Skip to content

Conversation

Alpha9584
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Sep 23, 2025

Pull request status dashboard

@Alpha9584 Alpha9584 requested a review from cgun-odoo September 24, 2025 08:35
@Alpha9584 Alpha9584 changed the title [ADD] Chapter 1 Owl [ADD] Discover Web Framework (mojem) Sep 24, 2025
onWillStart(() => loadJS("/web/static/lib/Chart/Chart.js"));

onMounted(() => {
const entries = Object.entries(this.props.data);

Choose a reason for hiding this comment

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

you're getting the entries but you're using the values and keys separately. Instead keep keys and values on different variables.

Comment on lines +26 to +29
handler = e => {
const a = chart.getElementAtEvent?.(e) || chart.getElementsAtEventForMode?.(e, "nearest", { intersect: true }, true);
if (a?.length) this.props.onSliceClick?.(chart.data.labels[a[0]._index ?? a[0].index], a[0]._index ?? a[0].index);
};

Choose a reason for hiding this comment

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

give your parameters better names than a and e


handler = e => {
const a = chart.getElementAtEvent?.(e) || chart.getElementsAtEventForMode?.(e, "nearest", { intersect: true }, true);
if (a?.length) this.props.onSliceClick?.(chart.data.labels[a[0]._index ?? a[0].index], a[0]._index ?? a[0].index);

Choose a reason for hiding this comment

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

this looks absolutely disgusting at least go to the next line

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.

3 participants