Skip to content

Simplify UX#8

Merged
alexevanczuk merged 2 commits intomainfrom
ae-simplify-api
Nov 8, 2022
Merged

Simplify UX#8
alexevanczuk merged 2 commits intomainfrom
ae-simplify-api

Conversation

@alexevanczuk
Copy link
Copy Markdown
Contributor

No description provided.

OUTPUT_FILENAME = T.let('packwerk.png'.freeze, String)

sig { void }
def initialize
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before, we tried to color each node based on team owners. This was extra unnecessary complexity and it forced us to raise if there are more than X unique colors.

nodes_to_draw = graph.nodes.select{|n| node_names.include?(n.name) }

nodes_to_draw.each do |node|
next unless highlighted_node_names.any? { |highlighted_node_name| node.depends_on?(highlighted_node_name) } || highlighted_node_names.include?(node.name)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before, we showed one level of ancestors and highlighted the given packs.

Instead, we only want to render exactly what the user is passing in. Later, we can think of a way to specify how many levels of ancestors/descendants to render.

@alexevanczuk alexevanczuk merged commit ab3c121 into main Nov 8, 2022
@alexevanczuk alexevanczuk deleted the ae-simplify-api branch November 8, 2022 19:18
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.

1 participant