This repository was archived by the owner on Jul 15, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add dockerfile viewer with syntax highlighting #181
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's Guide by SourceryThis pull request introduces a new Sequence diagram for copying the DockerfilesequenceDiagram
participant User
participant DockerfileEditor
participant NavigatorClipboard
User->>DockerfileEditor: Clicks 'Copy' button
DockerfileEditor->>DockerfileEditor: copyDockerfile()
alt dockerfile is not null
DockerfileEditor->>NavigatorClipboard: writeText(dockerfile)
NavigatorClipboard-->>DockerfileEditor: Promise (success or failure)
alt Success
DockerfileEditor->>DockerfileEditor: copied = true
DockerfileEditor->>DockerfileEditor: setTimeout(() => copied = false, 2000)
else Failure
DockerfileEditor->>console: error('Failed to copy: ', err)
end
else dockerfile is null
DockerfileEditor->>DockerfileEditor: return
end
Updated class diagram for DockerfileEditor componentclassDiagram
class DockerfileEditor {
-dockerfile: string | null | undefined
-maxHeight: string
-showLineNumbers: boolean
-stickyLineNumbers: boolean
-highlightLines: number[]
-theme: 'light' | 'dark' | 'auto'
-showCopyButton: boolean
-lines: string[]
-copied: boolean
+copyDockerfile()
+highlightLine(line: string): string
+applyHighlighting()
}
note for DockerfileEditor "Added stickyLineNumbers property and related logic"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @kmendell - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using a more specific name than
DockerFileViewer
for the component, perhaps something likeDockerfileViewerWithHighlighting
. - The
stickyLineNumbers
feature is a nice touch for usability.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
kmendell
added a commit
that referenced
this pull request
Apr 5, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Add a new Dockerfile viewer component with syntax highlighting and improved user experience
New Features:
Enhancements:
Chores: