Open Bug 1873899 Opened 1 year ago Updated 1 year ago

Add compass direction aliases for feature callout anchor attachment

Categories

(Firefox :: Messaging System, task, P3)

task
Points:
1

Tracking

()

People

(Reporter: aminomancer, Unassigned)

References

(Blocks 1 open bug)

Details

For panel feature callouts, we landed xul popup changes to support all 8 cardinal + ordinal directions, but we reused the existing naming scheme (e.g. "bottomcenter topleft"). This might be confusing, I know it was for me when I was starting to mess with xul popups. One of the reasons it's confusing is that corners are shared between two edges: should it be bottomright or rightbottom?

But conceptualizing these as directions rather than locations helps me in visualizing what the anchor attachment is gonna do. I just imagine a compass direction on the anchor, pointing to a spot on its perimeter, and do the same with the popup. And then I connect the spots on the perimeter and that basically becomes the anchor attachment.

So I think it would be more user-friendly if we supported aliases here. They'd still translate to the same popup alignment position strings, this would just be handled at the outermost layer in FeatureCallout. Something like

type PopupAttachmentPoint =
  | "north"
  | "northeast"
  | "east"
  | "southeast"
  | "south"
  | "southwest"
  | "west"
  | "northwest"
  | "topcenter"
  | "topright"
  | "rightcenter"
  | "bottomright"
  | "bottomcenter"
  | "bottomleft"
  | "leftcenter"
  | "topleft";

And update the documentation too.

Suggest P3 priority

Iteration: --- → 123.3 - Jan 15 - Jan 19
Priority: -- → P3
Points: --- → 1
Iteration: 123.3 - Jan 15 - Jan 19 → ---
You need to log in before you can comment on or make changes to this bug.