Skip to content

Conversation

ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Oct 1, 2025

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • Bug Fixes
    • Adjusted numeric input for double-precision columns to use 0.1 step increments for more predictable value entry.
    • Updated spreadsheet icon mapping to correctly display the numeric icon for double-precision types.

Copy link

appwrite bot commented Oct 1, 2025

Console

Project ID: 688b7bf400350cbd60e9

Sites (2)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code
 console-cloud
688b7c18002b9b871a8f
Ready Ready View Logs Preview URL QR Code

Note

Cursor pagination performs better than offset pagination when loading further pages.

@ItzNotABug ItzNotABug self-assigned this Oct 1, 2025
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

  • In integer.svelte, the input step attribute now uses 0.1 when column.type is 'double', otherwise 1.
  • In spreadsheet.svelte, the getAppropriateIcon switch mapping changed: case 'float' was replaced with case 'double', mapping 'double' to IconHashtag and removing the prior handling for 'float'.

Possibly related PRs

  • Fix: numbers edits #2286: Also modifies integer.svelte for numeric handling, adjusting input constraints (min/max), indicating related changes to number input behavior.

Suggested reviewers

  • eldadfux
  • TorstenDittmann

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly identifies the core change—adjusting the increment and decrement behavior for the double data type—and does so in a clear, concise single sentence without extraneous detail. It accurately reflects the primary purpose of the changeset, making it easy for reviewers to understand the focus of the pull request at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-double-increment-decrement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte (1)

296-324: Add missing ‘float’ case to getAppropriateIcon
The switch removed handling for "float", but front-end still uses type: 'float' in multiple places (e.g. store.ts, float.svelte), so any float column will now render no icon. Re-add:

 function getAppropriateIcon(type: string): ComponentType {
     switch (type) {
         case 'string':
             return IconText;
         case 'double':
+        case 'float': // support existing float columns
         case 'integer':
             return IconHashtag;
         …

[src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte#L296-324]

🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/columns/types/integer.svelte (1)

34-34: Conditional step value for integer vs. double is appropriate.
Using step={column.type === 'double' ? 0.1 : 1} gives sensible defaults for whole‐number and one‐decimal increments. If you anticipate use cases needing finer precision, consider making the step configurable (e.g. derived from a column.precision field or defaulting to 0.01/0.001).
Optional: since this component handles both integer and floating types, renaming integer.svelte to something like number.svelte could improve clarity in a future refactor.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 87a46a2 and 0a39811.

📒 Files selected for processing (2)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/columns/types/integer.svelte (1 hunks)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/spreadsheet.svelte (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e

@ItzNotABug ItzNotABug merged commit e8b9341 into main Oct 1, 2025
3 of 5 checks passed
@ItzNotABug ItzNotABug deleted the fix-double-increment-decrement branch October 1, 2025 12:15
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