You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/07/08 00:41:21 UTC

[I] add unit test coverage for calculateTotalTranslate3d [texera]

aglinxinyuan opened a new issue, #6255:
URL: https://github.com/apache/texera/issues/6255

   ### Task Summary
   
   Add `panel-dock.spec.ts` covering `calculateTotalTranslate3d`, which sums the x/y/z offsets across one or more `translate3d(...)` CSS fragments in a string.
   
   ## Background
   
   `frontend/src/app/common/util/panel-dock.ts` exports `calculateTotalTranslate3d`. It finds every `translate3d(...)` fragment in the input string and adds up their component offsets, returning a `[x, y, z]` tuple. It is pure (regex + arithmetic) and untested.
   
   ```ts
   export function calculateTotalTranslate3d(translates: string): [number, number, number] {
     // sums each translate3d(x, y, z) match; returns [0, 0, 0] when there are none
   }
   ```
   
   ## Behavior to pin
   
   | Input | Result |
   | --- | --- |
   | `"translate3d(10px, -5px, 0px)"` | `[10, -5, 0]` |
   | two concatenated `translate3d(...)` fragments | component-wise sum |
   | decimal / negative px values | parsed correctly (e.g. `1.5px`, `-20px`) |
   | a string with no `translate3d(...)` | `[0, 0, 0]` |
   
   Follow `size-formatter.util.spec.ts` in `common/util/` as the style template (plain `describe`/`it`/`expect`, run with `ng test`).
   
   ## Scope
   
   - New spec: `frontend/src/app/common/util/panel-dock.spec.ts`.
   - No production-code changes.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] add unit test coverage for calculateTotalTranslate3d [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #6255: add unit test coverage for calculateTotalTranslate3d
URL: https://github.com/apache/texera/issues/6255


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] add unit test coverage for calculateTotalTranslate3d [texera]

Posted by "PG1204 (via GitHub)" <gi...@apache.org>.
PG1204 commented on issue #6255:
URL: https://github.com/apache/texera/issues/6255#issuecomment-4965141459

   /take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] add unit test coverage for calculateTotalTranslate3d [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6255:
URL: https://github.com/apache/texera/issues/6255#issuecomment-4910332776

   <!-- texera:template-compliance -->
   👋 Thanks for opening this issue, @aglinxinyuan!
   
   It looks like the issue description doesn't quite follow our template yet:
   
   - This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
   
   Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
   
   You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org