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

Layout compatibility feature #390

Open
wants to merge 30 commits into
base: develop
Choose a base branch
from

Conversation

jahandaniyal
Copy link
Collaborator

@jahandaniyal jahandaniyal commented Jul 8, 2018

Purpose

This patch implements Layout Compatibility Check- Allow users to check whether a layout is compatible with a particular Graph Version.

Feature Details

GraphSpace allows its users to create custom layouts and with the addition of Version Control feature there could be scenarios where a particular user created layout may or may not be compatible with a given version of the Graph. This patch will allow users to check whether a layout is compatible or not.

The following features are available in the Layout Compatibility functionality:

Layout Selection Dropdown Menu

The Layout Dropdown menu allows Users of GraphSpace to quickly select and apply the Layouts.
There are 3 the broad sections to the Dropdown Menu -

  1. Automatic Layouts - System defined layouts available to all the Graphs in GraphSpace
  2. Private Layout - Layouts created by User for the Current Graph.
  3. Shared Layouts - Layouts shared by Users of GraphSpace

gs-screenshot-user1-layout_dropdown

Layout Compatibility Status Bar

The ticker bar used for notifying the User are of 3 different Colors corresponding to 3 different situations -

  1. Red - For Errors, like incompatible Layout or layout missing nodes/edges of Graph.
  2. Yellow - For Warnings, If the compatibility status of the Layout is unknown or if the layout has additional nodes/edges which are not present/required in the current version of the Graph.
  3. Green - For unknown layouts, after the Layout compatibility check if the layout is found to compatible then the User is notified in a Green Ticker bar.

gs-screenshot-graph-page-ticker_bar

Checking Layout Compatibility

Anytime a User tries to apply a Layout on a particular version of the Graph, GraphSpace checks the layout compatibility status. Based on the layout compatibility status, 3 scenarios may arise -

Layout is compatible

If the layout is compatible with the current version of the Graph then it simply applied to the Graph. The User will not receive any Error or Warning Notification in the Status Bar.

gs-screenshot-localuser1-compatible_layout

Layout is not compatible

If the layout is not compatible with the current version of the Graph then the User is notified about this issue in the Layout Compatibility Status Bar. The status bar turns red to notify the User that there are Errors in the Layouts. The User needs to fix the errors before they can apply the layout.

gs-screenshot-localuser1-incompatible_layout

Layout Compatibility is unknown

If the compatibility of the Layout with the current version of the Graph could not be determined then the User is notified about this issue in the Layout Compatibility Status Bar. The status bar turns Yellow to warn the User about the unknown layout compatibility status. The User can run a compatibility check to determine whether the layout is compatible or not.

gs-screenshot-localuser1-layout_status_unknown

The layout compatibility check will return either of these 2 results -

  1. Layout is compatible - The user is notified using a Green status bar suggesting that the Layout is compatible and can be applied. The status is then stored in the database to allow Users to skip the Layout Compatibility checking step next time they want to use this layout.

gs-screenshot-graph-page-ticker_bar_green

  1. Layout is not compatible - The conflicting or missing nodes & edges are displayed in a List format. The User can then edit these nodes & edges to fix the errors.

gs-screenshot-graph-page-layout_warning_status

Fixing Layout Compatibility Errors

Users can add style information for nodes & edges by clicking on the Add Style in Nodes/Edges without Style information Table.
The status bar displays the number the elements which require attention of the User. This status bar is updated in real-time as the User adds Style for the missing elements.

When the User has successfully added style for all the missing elements then the Status bar will be updated based on the following 2 conditions -

  1. Both the Nodes/Edges without Style information & Unknown Nodes & Edges Tables are empty - In this case the Status bar will disappear from the screen suggesting that all issues have been resolved.
  2. Unknown Nodes & Edges Table is not empty - In this case the Status bar changes to Warning to let the User know that there are additional elements in the Layouts which are not present in the Graph.

gs-screenshot-graph-page-layout_warning_status

Demonstration

LOOM Video demo

Dal tests

Tested Create, Read, Update and Delete operations on Layout-to-Graph-Version table.
Will add more tests as more features are added to Layout Compatibility module.

Open Questions and Pre-Merge TODOs

@jahandaniyal

  • PR documentation
    • (Document API changes) - No REST APIs
    • Document UI changes (mainly GIFs and screenshots)
  • User documentation
  • (API documentation in RAML) - No REST APIs
  • Developer documentation in Wiki
  • Python documentation in Code
  • Write tests in Python

Learning

http://gsoc18.blogspot.com/
Links to blog posts, patterns, libraries or addons used to solve this problem

Blog Posts

adbharadwaj and others added 29 commits March 3, 2018 20:36
Adding a pull request template to standardize the description of the proposed changes from contributors. Project contributors will automatically see the template's contents in the pull request body.

More details can be found [here](https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/).
@adbharadwaj
Copy link
Collaborator

fixes #383 @jahandaniyal can you confirm?

@jahandaniyal
Copy link
Collaborator Author

@adbharadwaj - The fix works but its not implemented for all the tables yet.
I will send a patch for the fix in a few days.

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