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(Web SDK): [no-issue] Further improvements and fixes #48

Open
wants to merge 2 commits into
base: feature/dpg-fixes-and-improvements
Choose a base branch
from

Conversation

eniosultan
Copy link
Collaborator

@eniosultan eniosultan commented Sep 30, 2024

Proposed changes

Fixeds/Improvements:

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

const range =
min !== undefined && max !== undefined ? max - min : undefined;

if (range !== undefined && range < 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we add more smaller ranges? Can we somehow make an algorithm out of this?

function getDecimalPlaces(num: number): number { const numStr = num.toString(); const decimalIndex = numStr.indexOf('.'); if (decimalIndex === -1) { return 0; // No decimal point found } return numStr.length - decimalIndex - 1; }

/>
<span></span>
<span translate>Date selection in the widget view.</span>
<button
Copy link
Collaborator

Choose a reason for hiding this comment

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

The padding of this element is somehow off. Can we make it more dense?
image

widgetInstanceGlobalTimeContext: false,
});
} else if (dateSelection === DATE_SELECTION.DASHBOARD_CONTEXT) {
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

consider return early.

this.dateSelection = DATE_SELECTION.CONFIG;
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

consider return early.

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.

2 participants