Varying behavior in policies linked to compliance frameworks
Description
I've identified some varying/unexpected behavior in policies linked to frameworks, I'll document here. Some case may just require explanation, some may be feature enhancements, but there may also be some bugs that require discussion.
1. Linked policy only displaying "Details" tab, but this also seems off
The expected behavior is to show Details with some human readable text explaining what the policy does based on the YAML. Then there is a 2nd YAML tab. This example doesn't show the policy definition and rather displays "Define the policy's location, conditions, and actions."
It also unexpectedly displays the YAML in the text area instead of in the YAML tab.
2. Duplicate policies appearing when there should only be one
There are a few instances of this occurring in my test repo. By hovering over the edit button I get a link to the source repository. Due to the issues in 1 we don't get more details in the drawer as expected but I'm able to see where the policy comes from through this edit button hover state. This particular policy is coming from this project which contains one policy:
3. Question about the edit button hoverstate
In the drawer we grey out Edit policy and point to the project to edit. The link takes you to the policies tab of the project.
However, the edit button below takes you directly to the project, to the policies tab, and into the edit view of the policy:
I believe these should be consistent, and ideally both should take you directly to the edit screen of the given policy (like the 2nd screenshot does already for the Edit button).
It's also a bit confusing to grey out the Edit policy button in the drawer as it suggests you are not able to edit when in fact you can if you can once you jump to the project/policy page.