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

few design/style fixes #3447

Merged
merged 5 commits into from
Jan 15, 2024
Merged

few design/style fixes #3447

merged 5 commits into from
Jan 15, 2024

Conversation

MeniKadosh1
Copy link
Contributor

@MeniKadosh1 MeniKadosh1 commented Jan 14, 2024

  • fixing diameter action background
  • remove limit from TargetApp length on uslistitem
  • adding icons to all general actions which missing it

Thank you for your contribution.
Before submitting this PR, please make sure:

  • PR description and commit message should describe the changes done in this PR
  • Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
  • Latest Code from master or specific release branch is merged to your branch
  • No unwanted\commented\junk code is included
  • No new warning upon build solution
  • Code Summary\Comments are added to my code which explains what my code is doing
  • Existing unit test cases are passed
  • New Unit tests are added for your development
  • Sanity Tests are successfully executed for New and Existing Functionality
  • Verify that changes are compatible with all relevant browsers and platforms.
  • After creating pull request there should not be any conflicts
  • Resolve all Codacy comments
  • Builds and checks are passed before PR is sent for review
  • Resolve code review comments
  • Update the Help Library document to match any feature changes

Summary by CodeRabbit

  • New Features

    • Introduced iconography to represent different actions, enhancing visual identification.
    • Added a new robot icon for specific actions.
  • Enhancements

    • Improved visual clarity by removing unnecessary background and width constraints on UI elements.
  • Documentation

    • Updated references to include new enums for image types associated with various actions.

- remove limit from TargetApp length on uslistitem
- adding icons to all general actions which missing it
Copy link
Contributor

coderabbitai bot commented Jan 14, 2024

Walkthrough

The recent updates across various Ginger modules primarily involve UI and UX enhancements. A background attribute was removed from a Grid element, impacting the page's look. New icons for robot, java, keyboard, file, and exchange image types were integrated into the system, reflecting the associated actions more clearly. Additionally, the handling of enums has been streamlined with the import of Amdocs.Ginger.Common.Enums across multiple action classes.

Changes

File Path Change Summary
.../ActDiameterEditPage.xaml
.../UcListViewItem.xaml
Removed Background attribute from xPageGrid.
Removed MaxWidth attribute from xItemExtraInfoTxtBlock.
.../ImageMakerControl.xaml.cs Added case for Robot icon in SetImage method.
Ginger/GingerCore/ActOcr.cs
.../ActionsLib/ActFileOperations.cs
.../ActReadTextFile.cs
.../ActeMail.cs
.../ActionsLib/General/ActClearAllVariables.cs
.../ActionsLib/General/ActSetVariableValue.cs
.../ActionsLib/Webservices/ActWebAPIBase.cs
.../ActionsLib/Webservices/ActWebAPIModel.cs
.../ActionsLib/Webservices/Diameter/ActDiameter.cs
.../DataSource/ActDSTableElement.cs
Modified to include Image property returning respective eImageType enum value. Imported Common.Enums in multiple action classes.
.../EnumsLib/eImageType.cs Added new entry Robot.

🐇✨
To the code we hop and skip,
Adding icons, making it hip.
No background here, a new image there,
Ginger's facelift, done with flair! 🎨🖌️
🐇✨

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d1c1444 and 0b30192.
Files selected for processing (17)
  • Ginger/Ginger/Actions/ActionEditPages/WebServices/ActDiameterEditPage.xaml (1 hunks)
  • Ginger/Ginger/UserControlsLib/ImageMakerLib/ImageMakerControl.xaml.cs (1 hunks)
  • Ginger/Ginger/UserControlsLib/UCListView/UcListViewItem.xaml (1 hunks)
  • Ginger/GingerCore/ActOcr.cs (2 hunks)
  • Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (2 hunks)
  • Ginger/GingerCore/Actions/ActSendKeys.cs (2 hunks)
  • Ginger/GingerCore/Actions/RobotFramework/ActRobot.cs (2 hunks)
  • Ginger/GingerCoreCommon/EnumsLib/eImageType.cs (1 hunks)
  • Ginger/GingerCoreNET/ActionsLib/ActFileOperations.cs (2 hunks)
  • Ginger/GingerCoreNET/ActionsLib/ActReadTextFile.cs (2 hunks)
  • Ginger/GingerCoreNET/ActionsLib/ActeMail.cs (1 hunks)
  • Ginger/GingerCoreNET/ActionsLib/General/ActClearAllVariables.cs (2 hunks)
  • Ginger/GingerCoreNET/ActionsLib/General/ActSetVariableValue.cs (2 hunks)
  • Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIBase.cs (2 hunks)
  • Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIModel.cs (2 hunks)
  • Ginger/GingerCoreNET/ActionsLib/Webservices/Diameter/ActDiameter.cs (2 hunks)
  • Ginger/GingerCoreNET/DataSource/ActDSTableElement.cs (2 hunks)
Additional comments: 24
Ginger/GingerCoreNET/ActionsLib/General/ActClearAllVariables.cs (1)
  • 29-29: The addition of the Image property with the eImageType.Delete value is appropriate for the ActClearAllVariables class, as it semantically represents the action's purpose of clearing variables.
Ginger/Ginger/Actions/ActionEditPages/WebServices/ActDiameterEditPage.xaml (1)
  • 13-13: The removal of the Background attribute from the Grid element named "xPageGrid" will change the visual appearance of the page. Ensure that this change aligns with the intended design and does not cause any readability or usability issues.
Ginger/GingerCoreCommon/EnumsLib/eImageType.cs (1)
  • 338-338: The addition of the Robot entry to the eImageType enumeration is clear and introduces a new icon type within the application.
Ginger/GingerCoreNET/ActionsLib/Webservices/Diameter/ActDiameter.cs (1)
  • 56-57: The override of the Image property to return eImageType.Exchange is suitable for the ActDiameter class, as it represents the action's functionality of message exchange in the Diameter protocol.
Ginger/GingerCore/Actions/ActSendKeys.cs (1)
  • 43-43: The addition of the Image property with the eImageType.KeyboardLayout value is appropriate for the ActSendKeys class, as it visually represents the action's purpose of sending keyboard inputs.
Ginger/GingerCoreNET/ActionsLib/General/ActSetVariableValue.cs (1)
  • 33-33: The introduction of the Image property with the eImageType.Variable value is suitable for the ActSetVariableValue class, as it visually represents the action's functionality of setting variable values.
Ginger/Ginger/UserControlsLib/UCListView/UcListViewItem.xaml (1)
  • 125-125: The removal of the MaxWidth attribute from the TextBlock element named "xItemExtraInfoTxtBlock" will allow for longer text to be displayed without truncation. Ensure that this change does not cause layout issues in the UI where this control is used.
Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIModel.cs (2)
  • 21-21: The import of Amdocs.Ginger.Common.Enums is added to utilize the eImageType enum.

  • 46-46: The Image property is overridden to return eImageType.Exchange, which is consistent with the PR's objective to add icons to actions.

Ginger/GingerCoreNET/ActionsLib/ActReadTextFile.cs (2)
  • 20-20: The import of Amdocs.Ginger.Common.Enums is added to utilize the eImageType enum.

  • 34-34: The Image property is overridden to return eImageType.File, aligning with the PR's objective to add icons to actions.

Ginger/GingerCoreNET/ActionsLib/Webservices/ActWebAPIBase.cs (2)
  • 21-21: The import of Amdocs.Ginger.Common.Enums is added to utilize the eImageType enum.

  • 41-41: The Image property is overridden to return eImageType.Exchange, which is consistent with the PR's objective to add icons to actions.

Ginger/GingerCore/ActOcr.cs (2)
  • 20-20: The import of Amdocs.Ginger.Common.Enums is added to utilize the eImageType enum.

  • 47-47: The Image property is overridden to return eImageType.PDFFile, aligning with the PR's objective to add icons to actions.

Ginger/GingerCore/Actions/RobotFramework/ActRobot.cs (2)
  • 19-19: The import of Amdocs.Ginger.Common.Enums is added to utilize the eImageType enum.

  • 46-46: The Image property is overridden to return eImageType.Robot, which is consistent with the PR's objective to add icons to actions.

Ginger/GingerCoreNET/ActionsLib/ActFileOperations.cs (1)
  • 38-38: The override of the Image property to return eImageType.File is consistent with the PR's objective to add icons to actions.
Ginger/GingerCoreNET/DataSource/ActDSTableElement.cs (1)
  • 37-37: The override of the Image property to return eImageType.DataTable aligns with the PR's goal of enhancing iconography.
Ginger/GingerCoreNET/ActionsLib/ActeMail.cs (2)
  • 43-43: The addition of the Image property with the value eImageType.Email is in line with the PR's aim to standardize icons for actions.

  • 36-36: The import of Amdocs.Ginger.Common.Enums is necessary for the eImageType enumeration used in the Image property override.

Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (2)
  • 22-22: The import of Amdocs.Ginger.Common.Enums has been added. Ensure that this namespace is required for the changes made in this file, specifically for the use of eImageType.Java.

  • 44-44: The Image property has been overridden to return eImageType.Java. This change aligns with the PR's objective to enhance iconography within the application. Confirm that the eImageType.Java enum value is correctly defined in the Amdocs.Ginger.Common.Enums namespace and that it is the intended icon for this action.

Ginger/Ginger/UserControlsLib/ImageMakerLib/ImageMakerControl.xaml.cs (1)
  • 616-618: The addition of the Robot case in the SetImage method is consistent with the PR's objective to add new icons for general actions. Ensure that the Solid_Robot icon is available in the FontAwesome5 package used by the project.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 0b30192 and 1cdcd6a.
Files selected for processing (1)
  • Ginger/Ginger/UserControlsLib/UCListView/UcListViewItem.xaml.cs (1 hunks)
Additional comments: 1
Ginger/Ginger/UserControlsLib/UCListView/UcListViewItem.xaml.cs (1)
  • 819-822: The conditional check to set the tooltip for xItemDescriptionTxtBlock only if fullDesc is not empty is a good practice to avoid setting unnecessary or uninformative tooltips. This change enhances the user experience by providing tooltips only when there is descriptive text available.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1cdcd6a and 43d02d5.
Files selected for processing (1)
  • Ginger/Ginger/Actions/ActionEditPage.xaml (1 hunks)
Additional comments: 1
Ginger/Ginger/Actions/ActionEditPage.xaml (1)
  • 127-127: The Height property of xInputValuesGrid has been removed. This change will allow the grid to automatically size to its content or available space. Ensure that this change does not negatively impact the layout or user experience in scenarios where the content might be larger than the intended design.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 43d02d5 and b692b1a.
Files selected for processing (1)
  • Ginger/Ginger/Actions/ActionEditPage.xaml.cs (1 hunks)
Additional comments: 6
Ginger/Ginger/Actions/ActionEditPage.xaml.cs (6)
  • 1032-1035: The changes in the SetActInputValuesGrid method involve adjusting the column widths for the Param and Value columns in a data grid. The new column widths seem to be set to relative weights, which is a common practice for responsive design in WPF applications. However, there is a commented-out line for a ValueForDriver column, which might indicate an incomplete removal or future work that should be tracked.

  • 1029-1038: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-1]

The file header contains a license agreement. It's important to ensure that this license is compatible with the rest of the project and that the use of the code adheres to the terms specified in the license.

  • 1029-1038: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-1]

The file contains a large number of using directives. It's a good practice to remove any unused namespaces to clean up the file and potentially improve compile-time.

  • 1029-1038: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-1]

Ensure that there are no hardcoded sensitive information or security keys within the code. This is a general security best practice to avoid potential leakage of sensitive data.

Verification successful

The search for common sensitive information patterns such as passwords, secrets, API keys, or tokens within the ActionEditPage.xaml.cs file did not yield any results. This suggests that there are no hardcoded sensitive information or security keys within the code of this specific file.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Search for common sensitive information patterns like passwords, secrets, etc.
rg --type cs "(password|secret|apikey|token)" src/Ginger/Ginger/Actions/ActionEditPage.xaml.cs

Length of output: 185



Script:

#!/bin/bash
# The previous script failed because the file path was incorrect. Let's find the correct file path.
fd "ActionEditPage.xaml.cs" --type f --exec rg --type cs "(password|secret|apikey|token)" {}

Length of output: 94

* 1029-1038: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-1]

Review the use of data structures and loops to ensure they are optimized for performance, especially considering this file seems to be part of a UI and could impact the responsiveness of the application.

  • 1029-1038: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-1]

Check for magic numbers and strings throughout the code. Replace them with named constants to improve readability and maintainability.

Comment on lines +1032 to +1035
view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.Param), WidthWeight = 40 });
view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.Value), WidthWeight = 55 });
view.GridColsView.Add(new GridColView() { Field = "...", WidthWeight = 5, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = (DataTemplate)this.xPageGrid.Resources["InputValueExpressionButton"] });
//view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.ValueForDriver), Header = "Value ForDriver", WidthWeight = 150, BindingMode = BindingMode.OneWay });
Copy link
Contributor

Choose a reason for hiding this comment

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

The commented-out line for the ValueForDriver column (line 1035) should either be removed if it's no longer needed or a TODO/FIXME comment should be added to clarify why it's commented and what future action is required.

- //view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.ValueForDriver), Header = "Value ForDriver", WidthWeight = 150, BindingMode = BindingMode.OneWay });
+ // TODO: Determine if the ValueForDriver column is needed and remove or uncomment this line accordingly.

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.Param), WidthWeight = 40 });
view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.Value), WidthWeight = 55 });
view.GridColsView.Add(new GridColView() { Field = "...", WidthWeight = 5, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = (DataTemplate)this.xPageGrid.Resources["InputValueExpressionButton"] });
//view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.ValueForDriver), Header = "Value ForDriver", WidthWeight = 150, BindingMode = BindingMode.OneWay });
view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.Param), WidthWeight = 40 });
view.GridColsView.Add(new GridColView() { Field = nameof(ActInputValue.Value), WidthWeight = 55 });
view.GridColsView.Add(new GridColView() { Field = "...", WidthWeight = 5, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = (DataTemplate)this.xPageGrid.Resources["InputValueExpressionButton"] });
// TODO: Determine if the ValueForDriver column is needed and remove or uncomment this line accordingly.

@Maheshkale447 Maheshkale447 merged commit e559622 into Releases/Beta Jan 15, 2024
1 check passed
@Maheshkale447 Maheshkale447 deleted the Design-Fixes-Meni branch January 15, 2024 08:25
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