Skip to content

[Refactor] Add option for number element to return an integer #2698

Open
@enarroied

Description

@enarroied

📌 Description

The number visual element handles both float and integer inputs. When I select a step of 1 (or another natural number), I may (or may not) want to output integers. I have a case like that. I can fix it somewhere else in the code, but I think having an argument like output_int defaulting to False would be great.
Another option would be output_type defaulting to "float" and an "integer" or "int" option. However, I only see 2 options, and booleans are unambiguous.

What do you think?

📜 Code of Conduct

  • I have checked the existing issues to avoid duplicates.
  • I am willing to work on this issue (optional)

✅ Acceptance Criteria

  • The refactored code maintains existing functionality without breaking changes.
  • Any new code is covered by unit tests.
  • Code coverage remains at least 90%.
  • Performance improvements are documented, if applicable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions