[
https://issues.apache.org/jira/browse/SOLR-17911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132605#comment-18132605
]
Nick Shanin commented on SOLR-17911:
------------------------------------
[~malliaridis] The file content viewer from this ticket is implemented on a
[branch|https://github.com/nick-boss-tech/solr/tree/solr-17911-file-content-viewer],
and the
[diff|https://github.com/apache/solr/compare/main...nick-boss-tech:solr-17911-file-content-viewer]
is {{FileContentViewer.kt}} under
{{ui/shared/src/commonMain/kotlin/org/apache/solr/ui/views/files/}} with its
test {{FileContentViewerTest.kt}} (line numbers, escaped characters,
scrolling). Spotless and the tests pass at the branch head. The component has
no {{editable}} parameter yet, which the ticket allows.
Is this the right scope for the ticket, and would you review it if I open the
branch as a PR?
🤖 _AI text above_ 🤖 _(reviewed by Nick Shanin)_
> Implement File Content Viewer Component
> ---------------------------------------
>
> Key: SOLR-17911
> URL: https://issues.apache.org/jira/browse/SOLR-17911
> Project: Solr
> Issue Type: Sub-task
> Components: Admin UI
> Reporter: Christos Malliaridis
> Priority: Major
> Labels: new-ui, newdev, ui
>
> In the new UI we want to view the content of files (and later edit it) in a
> format that is similar to the experience of IDEs. These file previews are
> currently used in the [Cluster -> Zookeeper
> section|https://www.figma.com/design/VdbEfcWQ8mirFNquBzbPk2/Apache-Solr-Admin-UI-v2-Concept?node-id=319-20114&t=yxFihPpG3r7FXACm-1]
> and the [Configsets ->
> Files|https://www.figma.com/design/VdbEfcWQ8mirFNquBzbPk2/Apache-Solr-Admin-UI-v2-Concept?node-id=227-7661&t=yxFihPpG3r7FXACm-1].
> h2. Task
> Implement a file content viewer component that displays the content of a file.
> h2. Acceptance Criteria
> - The text input may be a simple string for now (not a file)
> - You may write the component in a way that wil later be extendible to a code
> editor (e.g. with an {{editable: Boolean}} parameter)
> - The lines are numerated
> - User can select parts of the file content (e.g. for copy-pasting)
> - Line breaks are respected
> - Escaped characters are respected
> - Horizontal and vertical scrolling is supported when the content exceeds the
> width or height
> Syntax highlighting and editing file content is out of this ticket's scope.
> You may however take into account that this component will likely be updated
> later (separate ticket) to allow file editing. Any actions / outputs of
> editing or saving changes can be ignored for now.
> You should also ignore any potential displaying options like changing the
> wrapping of the lines that exceed the available width or increasing the font
> size. These features would overcomplicate the initial PR and may be added in
> a later state after implementation details are clarified and defined.
> h2. Additional Information
> You do not have to cover large files with buffered readers, as it is likely
> not supported by our API. So loading and "rendering" the entire file is fine.
> You may however consider lazily loading lines that are not displayed, if that
> does not cause additional complications later when we want to enable syntax
> highlighting (different ticket).
> The [code viewer of the Compose Multiplatform
> examples|https://github.com/JetBrains/compose-multiplatform/tree/master/examples/codeviewer]
> provides a solution for the [code viewer|] that may be a bit complicated,
> but could be used for inspiration.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]