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

Added styling rules for relationship color (cherrypicked) #537

Merged
merged 9 commits into from
Aug 1, 2023

Conversation

nielsdejong
Copy link
Collaborator

@nielsdejong nielsdejong commented Jul 29, 2023

Cherry picking commits from https://github.com/mercedes-benz/neodash/tree/VULCAN-171/StylingRulesForRelationships

Original PR:

This pull request adds a way to style relationships using the dashboard json setting as shown in example below:
"styleRules": [
{
"field": "RELATIONSHIP_NAME.propertyName",
"condition": "contains",
"value": "some_string",
"customization": "relationship color",
"customizationValue": "#79AEBF"
}

The styling of widths is not added but should be simple enough to do as well should the need arise. Unfortunately I was not able to add a UI for this to neodash style rule creation modal (the filter for source fields is only nodes at the moment, not sure how we could bring relationships in) - so this is a hidden feature accessible from json definition of a dashboard only.

NOTICE
The program was tested solely for our own use cases, which might differ from yours.

Author Info: Brahm Prakash Mishra [[email protected]](mailto:[email protected]) on behalf of Mercedes-Benz Research and Development India

[https://github.com/mercedes-benz/mercedes-benz-foss/blob/master/PROVIDER_INFORMATION.md](https://github.com/Daimler/daimler-foss/blob/master/PROVIDER_INFORMATION.md)

Licensed under MIT

@nielsdejong nielsdejong changed the title Vulcan 171/styling rules for relationships2 Added styling rules for relationship color (cherrypicked) Jul 29, 2023
@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@0d1f1ab). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #537   +/-   ##
==========================================
  Coverage           ?   47.13%           
==========================================
  Files              ?      171           
  Lines              ?     6759           
  Branches           ?     2083           
==========================================
  Hits               ?     3186           
  Misses             ?     3532           
  Partials           ?       41           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BennuFire
Copy link
Collaborator

I made some modifications in the code in order to allow the use of it from the Style Modal.

Copy link
Collaborator

@BennuFire BennuFire left a comment

Choose a reason for hiding this comment

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

Should be fine now. Let see if someone else can test it around.

src/extensions/styling/StyleRuleEvaluator.ts Outdated Show resolved Hide resolved
src/extensions/styling/StyleRuleEvaluator.ts Outdated Show resolved Hide resolved
src/report/ReportRecordProcessing.tsx Outdated Show resolved Hide resolved
src/report/ReportRecordProcessing.tsx Outdated Show resolved Hide resolved
src/card/Card.tsx Outdated Show resolved Hide resolved
@BennuFire BennuFire self-requested a review July 31, 2023 20:29
@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@nielsdejong nielsdejong merged commit fcb014b into develop Aug 1, 2023
5 checks passed
@BennuFire BennuFire mentioned this pull request Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants