Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eagle 1375 #805

Merged
merged 4 commits into from
Dec 13, 2024
Merged

Eagle 1375 #805

merged 4 commits into from
Dec 13, 2024

Conversation

M-Wicenec
Copy link
Collaborator

@M-Wicenec M-Wicenec commented Dec 12, 2024

displaying active graph config in the graph name wrapper and in the graph inspector

Summary by Sourcery

Display the active graph configuration details in the graph inspector and graph name wrapper, enhancing the user interface with better organization and additional functionality.

New Features:

  • Display the active graph configuration name and description in the graph inspector and graph name wrapper.

Enhancements:

  • Reorder icons in the graph inspector for better organization and user experience.
  • Add a new icon in the graph inspector to view the graph configurations table.

Copy link
Contributor

sourcery-ai bot commented Dec 12, 2024

Reviewer's Guide by Sourcery

This PR implements UI changes to display active graph configuration information in two locations: the graph name wrapper at the top of the page and in the graph inspector panel. The changes include adding new UI elements, styling updates, and the necessary supporting TypeScript code.

Updated Class Diagram for Eagle and FileInfo

classDiagram
    class Eagle {
        +ko.PureComputed activeConfigText
        +toggleWindows() : void
    }
    class FileInfo {
        +getText() : string
    }
    note for Eagle "Added activeConfigText to display active graph configuration."
    note for FileInfo "Updated getText method to include strong HTML tags."
Loading

File-Level Changes

Change Details Files
Added active graph configuration display in the graph name wrapper
  • Created a new computed observable 'activeConfigText' to format the config name
  • Added a new span element to display the active config name
  • Updated HTML binding to support HTML content in the filename display
  • Added margin styling for the new config display
src/Eagle.ts
templates/navbar.html
static/base.css
Enhanced graph inspector with configuration information
  • Added new rows to display active config name and config length
  • Added tooltips for configuration information
  • Added a configuration table view button
  • Reorganized inspector header buttons layout
templates/inspector.html
Improved repository information display formatting
  • Added HTML bold tags to repository service names in file info text
  • Updated styling for graph configurations table header
src/FileInfo.ts
static/tables.css

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @M-Wicenec - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Consider using a safe HTML encoding method for repository information (link)
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🔴 Security: 1 blocking issue
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -371,9 +371,9 @@ export class FileInfo {
getText = () : string => {
if (this.repositoryName !== ""){
if (this.path === ""){
return this.repositoryService + ": " + this.repositoryName + " (" + this.repositoryBranch + "): " + this.name;
return "<strong>" + this.repositoryService + "</strong>: " + this.repositoryName + " (" + this.repositoryBranch + "): " + this.name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 issue (security): Consider using a safe HTML encoding method for repository information

Direct string concatenation with HTML tags could lead to XSS vulnerabilities if any of the fields contain special characters. Consider using a sanitization function or template system.

Copy link
Collaborator

@james-strauss-uwa james-strauss-uwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

src/Eagle.ts Outdated
@@ -385,6 +385,14 @@ export class Eagle {
return fileInfo.getText();
}, this);

activeConfigText : ko.PureComputed<string> = ko.pureComputed(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name this 'activeConfigHtml' to indicate that it returns html

src/FileInfo.ts Outdated
@@ -371,9 +371,9 @@ export class FileInfo {
getText = () : string => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename to getHtml() here too

</div>
<div class="row inspectorEdgeSrcNodeId contentObject">
<div class="col-6 col contentObjectTitle">
<h5>Config Length: </h5>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Config Fields:" instead of length?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea maybe, i wasnt quite sure what to call it without making it too long

@M-Wicenec M-Wicenec merged commit 5597b65 into master Dec 13, 2024
1 check passed
@M-Wicenec M-Wicenec deleted the eagle-1375 branch December 13, 2024 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants