Use Case: Embedded Visualforce Page on Layout
My top1 is to embed Visualforce Pages on standard layouts with a dynamic height of 100% of it's content instead of a fixed height in px - which can not be anticipated in most cases at design-time. This happens quite often if you display dynamic data like tables or lists with variable content. Within the supported functionality, you end up either with huge empty screen-areas or scrollbars inside scrollbars or both and as an result with a very poor UX. This is a well-known limitation:
https://success.salesforce.com/ideaView?id=08730000000BpiMAAS but open for 6+ years.
Injecting a addEventListener("message",...) into the top-frame and using postMessage() to request an iframe resize. Typically you will repeat postMessage() everytime when the iframe content changes or when the iframe will be resized (this happens because of it's 100% width by default when users change the window size). The pattern is simple, only a few lines of code.
I remember the App as quite bulky. Since the pattern is very simple, a rebuild from scratch will take only a few lines of code.
As expected, the resizing happens seamless and without issues. UX and Look&Feel is almost perfect. You can use this pattern for multiple Iframes on a single layout.
Override the the entire View by a Visualforce Page. This is a very radical and non-cooperative approach. Downsides:
- loss of customizability
- if you want to install 2 apps which both come with overrides for e.g. Opportunity, you can only use the vf-page provided by one.
- you loose the Force.com Quick Access Menu