script-lab icon indicating copy to clipboard operation
script-lab copied to clipboard

Long snippet name should be truncated instead of fully replaced by "..."

Open ElizabethSamuel-MSFT opened this issue 6 years ago • 3 comments

Bug Report

  • Host: OUTLOOK
  • OS: Windows
  • Browser: N/A
  • Environment: alpha

Expected behavior:

Title should be truncated, if anything

Actual behavior:

Title disappears and is replaced with "..."

Steps to Reproduce:

  1. Open a blank snippet
  2. Change the snippet name to a long-ish title (I didn't check how many characters triggers the switch)

Failure Logs:

Screenshot:

image

ElizabethSamuel-MSFT avatar Mar 29 '19 21:03 ElizabethSamuel-MSFT

@nico-bellante , does it truly need designers, or does it just need work on your end (or Fabric's) to make the UI fit correctly?... Seems related to https://github.com/OfficeDev/script-lab/issues/318

Zlatkovsky avatar Apr 01 '19 13:04 Zlatkovsky

We need to know how many characters to truncate the title at

nico-bellante avatar Apr 01 '19 17:04 nico-bellante

Well, ideally we'd just truncate it at whatever we have space for.

If we can't know that, can we at least know the width of the control, and then calculate with javascript (width minus padding minus the widest letter, minus 1 or two characters for safety?)

If we can't do that, just pull out a number that looks good when the taskpane is at its default width. Presumably something like 30, though I'm just guessing.

You don't need designers for this.

Zlatkovsky avatar Apr 01 '19 18:04 Zlatkovsky