Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Expressions reference — English content/altinn-studio/v8/reference/logic/expressions/_index.en.md |
Added public docs for plus, minus, multiply, and divide: parameter/return signatures, example JSON inputs and numeric outputs, updated function tables and availability markers, and minor formatting. (+63/-15 lines) |
Expressions reference — Norwegian Bokmål content/altinn-studio/v8/reference/logic/expressions/_index.nb.md |
Added localized expandable docs for plus, minus, multiply, and divide with examples and table/header formatting adjustments; documentation-only changes. (+63/-15 lines) |
Expressions reference — Norwegian Nynorsk (not present) content/altinn-studio/v8/reference/logic/expressions/_index.nn.md |
No changes in this PR — Nynorsk page not modified or added. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
➕ ➖ ✖️ ➗
Four small functions take the stage,
Examples printed on the page,
English, Bokmål—side by side,
Docs now hum with simple pride.
🚥 Pre-merge checks | ✅ 3
✅ 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 'Docs for arithmetic expressions' directly and accurately summarizes the main change—adding documentation for four new arithmetic functions (+, -, *, /). |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
feature/arithmetic-expressions
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@content/altinn-studio/v8/reference/logic/expressions/_index.en.md`:
- Around line 313-317: The table of function parameters is inconsistent with the
detailed docs; update the parameter column entries for the functions `plus`,
`minus`, `multiply`, `divide`, and `average` so they match their detailed
descriptions: change `plus` and `minus` from "none or multiple numbers" to "one
or multiple numbers" (or "at least one number"), and change `multiply`,
`divide`, and `average` from "one or multiple numbers" to "two or multiple
numbers" (or "at least two numbers"); ensure the table text for these symbols
(`plus`, `minus`, `multiply`, `divide`, `average`) exactly mirrors the phrasing
used in their respective detailed sections.
In `@content/altinn-studio/v8/reference/logic/expressions/_index.nb.md`:
- Around line 308-312: The table rows for functions `plus`, `minus`, `multiply`,
`divide`, and `average` use invalid fragment link syntax `[Tall]($tall)`; update
each occurrence to use the correct markdown fragment link `[Tall](`#tall`)` so the
links point to the Tall section, e.g. inside the table cells for `plus`,
`minus`, `multiply`, `divide`, and `average` replace `$tall` with `#tall`.
- Around line 310-312: The parameter descriptions in the table for the functions
`multiply`, `divide`, and `average` are inconsistent with their detailed docs
(which state they expect at least two numbers); update the table entries for
`multiply`, `divide`, and `average` so the parameter column reads that they
require "minst to [Tall]" (or equivalent Norwegian phrasing matching the
detailed descriptions) instead of "et eller flere [Tall]" to keep them aligned
with the detailed descriptions.
- Around line 308-309: The Norwegian docs for the functions plus and minus are
inconsistent with the English version: update the Norwegian descriptions and the
table entries for the functions plus and minus to match the English requirement
of allowing at least one number (i.e., accept one or more arguments), not "minst
to tall"; specifically change any Norwegian phrases like "minst to tall" or "et
eller flere valgfrie [Tall]" to clearly state "minst ett tall" or "ett eller
flere tall" and ensure the parameter column for `plus` and `minus` reflects
one-or-more [Tall] arguments to match the English docs for the functions plus
and minus.
content/altinn-studio/v8/reference/logic/expressions/_index.en.md
Outdated
Show resolved
Hide resolved
content/altinn-studio/v8/reference/logic/expressions/_index.nb.md
Outdated
Show resolved
Hide resolved
content/altinn-studio/v8/reference/logic/expressions/_index.nb.md
Outdated
Show resolved
Hide resolved
content/altinn-studio/v8/reference/logic/expressions/_index.nb.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@content/altinn-studio/v8/reference/logic/expressions/_index.en.md`:
- Around line 298-316: Table parameter label casing is inconsistent: change the
"[numbers](`#numbers`)" labels to "[Number](`#numbers`)" for the `plus`, `minus`,
`multiply`, and `divide` rows so they match the rest of the table; update the
three occurrences in the rows for functions named plus, minus, multiply, and
divide to use the capitalized label.
content/altinn-studio/v8/reference/logic/expressions/_index.en.md
Outdated
Show resolved
Hide resolved
TomasEng
left a comment
There was a problem hiding this comment.
Dette ser bra ut, men vi bør kanskje også dokumentere hvordan uttrykkene responderer på null?
There was a problem hiding this comment.
🧹 Nitpick comments (1)
content/altinn-studio/v8/reference/logic/expressions/_index.en.md (1)
1085-1127: Minor wording inconsistency across function descriptions.The
plusandminusfunctions use singular form "decimal or integer" (lines 1086, 1097), whilstmultiplyanddivideuse plural "decimals or integers" (lines 1108, 1119). Consider standardising to the plural form throughout for consistency, as it's slightly more natural when referring to general classes of numbers.📝 Optional consistency fix
{{% expandlarge id="func-plus" header="plus" %}} -The `plus` function expects two numbers, either decimal or integer. +The `plus` function expects two numbers, either decimals or integers. Example:{{% expandlarge id="func-minus" header="minus" %}} -The `minus` function expects two numbers, either decimal or integer. +The `minus` function expects two numbers, either decimals or integers. Example:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@content/altinn-studio/v8/reference/logic/expressions/_index.en.md` around lines 1085 - 1127, Standardize wording by changing the `plus` and `minus` descriptions to use the plural form "decimals or integers" to match `multiply` and `divide`; update the text inside the `plus` and `minus` expandblocks (identifiers func-plus and func-minus) so each reads "expects two numbers, either decimals or integers" and keep the rest of the examples and null behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@content/altinn-studio/v8/reference/logic/expressions/_index.en.md`:
- Around line 1085-1127: Standardize wording by changing the `plus` and `minus`
descriptions to use the plural form "decimals or integers" to match `multiply`
and `divide`; update the text inside the `plus` and `minus` expandblocks
(identifiers func-plus and func-minus) so each reads "expects two numbers,
either decimals or integers" and keep the rest of the examples and null behavior
unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c19d2f0f-becb-4427-b799-a6b61ef4bcb5
📒 Files selected for processing (2)
content/altinn-studio/v8/reference/logic/expressions/_index.en.mdcontent/altinn-studio/v8/reference/logic/expressions/_index.nb.md
Docs for the new expressions +-*/
Summary by CodeRabbit