mcgilman commented on issue #3335: NIFI-5018
URL: https://github.com/apache/nifi/pull/3335#issuecomment-468034211
 
 
   @R-Bower Thanks for the PR! It is a very concise solution to the problem at 
hand. I share some of the share concerns that have been mentioned thus far and 
I have a few suggestions for addressing them.
   
   **Turning this feature on/off**
   Rather than always using snap-to-grid or adding a property which would set 
it for the entire instance what are your thoughts about conditionally snapping 
based on whether the drag event contains some modifier key (like Drag-Shift or 
something)? We could even discuss further with others in the community if the 
modifier key activated the snap functionality or if snap was the default and 
the modifier activated the more granular placement. If we took an approach like 
this we could even apply the same logic when resizing a label to ensure it's 
dimensions are a factor of `snapAlignmentPixels`. For consistency, I would also 
probably apply the same logic to connection bend point movement.
   
   **Component dimensions**
   My hesitations with the component dimensions are slightly different. The 
design/layout of each canvas node have been thoroughly considered/implemented 
to ensure they are pixel perfect. If we modify the dimensions of them it would 
probably warrant reconsidering each. Also, there would be another concern that 
could affect flow layout. As the dimensions change, the spacing between the 
nodes in existing flows also change and may require manually adjusting the 
layout. In extreme cases (either large changes to the dimensions or tightly 
laid-out flows), nodes could even overlap. This is admittedly not super 
concerning in this PR because the dimension changes here are so minimal. But 
it's still something we are super conscious of and generally avoid. However, I 
can appreciate the solution here by having the dimensions be a factor of 
`snapAlignmentPixels` we can align against all four sides of the node. Clever :)
   
   @moranr Can you pull down this PR and evaluate each of the affected 
components to see if the change in dimensions would necessitate adjusting any 
of their contents?
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to