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/08/08 01:06:16 UTC

[I] Render the dataset file preview's viewer branches [texera]

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

   ### Task Summary
   
   `UserDatasetFileRendererComponent`'s class is well covered, but its template is not: locally it sits at 25% of statements while the class is at 91%.
   
   The template is a viewer switch — each `displayX` flag selects exactly one preview — and only the CSV path had ever been rendered:
   
   | Flag | Should render |
   |---|---|
   | `isLoading` / `isFileLoadingError` / `isFileSizeUnloadable` / `isFileTypePreviewUnsupported` | the matching alert, and only that one |
   | `displayCSV` or `displayXlsx` | the shared `nz-table` |
   | `displayImage` | an image, clickable into a full-size modal |
   | `displayMP4` / `displayMP3` | a `<video>` / `<audio>` |
   | `displayMarkdown` / `displayJson` / `displayPlainText` | the matching text viewer |
   
   The media branches are guarded by `&& safeFileURL`, which is load-bearing: the flag is set as soon as the MIME type is known, while the object URL is built asynchronously, so rendering on the flag alone emits a source-less `<img>`/`<video>`/`<audio>`.
   
   Notes for whoever picks this up:
   
   - The first `detectChanges()` runs `ngOnInit`, which inspects the empty `filePath` and settles on "preview unsupported". Flags set before that cycle are silently overwritten — clear the state with the component's own `turnOffAllDisplay()` afterwards.
   - Binding `[src]` makes Angular call `DomSanitizer.sanitize`; the existing stub only provides `bypassSecurityTrustUrl` and cannot render media.
   - `<markdown>` needs `MarkdownModule.forRoot()`, as in `agent-chat.component.spec.ts`.
   
   ### 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] Render the dataset file preview's viewer branches [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #7403: Render the dataset file preview's viewer branches
URL: https://github.com/apache/texera/issues/7403


-- 
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] Render the dataset file preview's viewer branches [texera]

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

   <!-- 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