Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shift into delete action #7274

Merged

Conversation

FrancisMengx
Copy link
Contributor

@FrancisMengx FrancisMengx commented Nov 30, 2018

Pull request checklist

  • Include a change request file using $ npm run change

Description of changes

Fix for current bug with delete button.
Repro of the bug:

  1. Type in something in input
  2. Move the cursor one character back.
  3. Hit delete.
    Expect:
    Only remove the character after the cursor.
    Actual:
    Remove both the character and highlighted option.

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

@KevinTCoughlin
Copy link
Member

Should we be committing yarn.lock files? cc: @kenotron

@KevinTCoughlin
Copy link
Member

@FrancisMengx is it possible to add a unit test for this fix?

Copy link
Contributor

@cliffkoh cliffkoh left a comment

Choose a reason for hiding this comment

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

We should not check in the yarn.lock file.

@FrancisMengx from where are you getting the "Shift+Del" interaction? It is definitely not super intuitive to me ..

@joschect what do you think of the proposed change here?

{
"packageName": "office-ui-fabric-react",
"comment": "Add shift into delete suggestion.",
"type": "minor"
Copy link
Contributor

Choose a reason for hiding this comment

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

patch

"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Add shift into delete suggestion.",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be something like Picker: ....

@joschect
Copy link
Contributor

joschect commented Dec 1, 2018

I'm pretty confused about this. What exactly is this fixing? Also what if I highlight something with shift, but don't have it pressed?

@FrancisMengx
Copy link
Contributor Author

FrancisMengx commented Dec 3, 2018

@joschect https://developer.microsoft.com/en-us/fabric#/components/peoplepicker

In here, you can repro:

  1. type in 'Aa'.
  2. press left arrow key.
  3. press delete button.

Expect:
Only remove the second 'a' you typed in.

Actual:
Remove the second 'a' and the first highlighted suggestion.

The fix is to differentiate between the input editing delete and deleting suggestions.

@FrancisMengx
Copy link
Contributor Author

@cliffkoh shift delete is the keyboard short cut in windows deleting something permanently.

Francis Meng added 2 commits December 3, 2018 08:33
…x/office-ui-fabric-react into add-shift-into-delete-action
@cliffkoh cliffkoh dismissed their stale review December 3, 2018 18:25

Dismiss review as the changes requested has been made

Copy link
Contributor

@cliffkoh cliffkoh left a comment

Choose a reason for hiding this comment

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

We still need @joschect to sign off on the new keyboard shortcut. I'm not sure to what extent this is considered a "breaking" change from Picker functionality but the API surface is otherwise similar.

@joschect is there a PM or designer for the Pickers who needs to get involved with this change? @FrancisMengx is making this change based off a request by a PM on OWA's end.

@joschect
Copy link
Contributor

joschect commented Dec 3, 2018

@cliffkoh I don't know of a designer who owns the people picker/pickers. This change makes sense as right now I would consider it broken, it's really bad that we'll delete suggestions without letting you know if you just press delete.

@joschect joschect merged commit 2a7f5b1 into microsoft:master Dec 3, 2018
@msft-github-bot
Copy link
Contributor

🎉[email protected] has been released which incorporates this pull request.:tada:

Handy Links:

Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Dec 7, 2018
* master: (55 commits)
  Applying package updates.
  default spellCheck=false in BasePicker (microsoft#7301)
  Separating border:none from .cell and removing from .root to avoid style override in DetailsColumn (microsoft#7211)
  Dropdown component honors ariaLabel prop (microsoft#7292)
  Add extensions for PowerShell, HEIC, 3gp, mak to FileTypeIconMap (microsoft#7299)
  Fix microsoft#7258 - Documentation is missing for button (microsoft#7302)
  Applying package updates.
  Add customizer scope to TeachingBubbleContent (microsoft#7294)
  Applying package updates.
  DevExp: Part 2 of 2 - the codebase no longer uses const enums, enabling consumers to be able to use isolatedModules (microsoft#7119)
  Add card dgl functionality (microsoft#7287)
  Only support LTS versions of Node 8 and 10 (microsoft#7290)
  add shift into delete action (microsoft#7274)
  Update CODEOWNERS
  Adding RTL support for DetailsList drag-drop to reorder columns (microsoft#7267)
  Applying package updates.
  Improve TeachingBubble usage docs (microsoft#7266)
  Lifting the resolution of default and user provided style variables to Utilities. (microsoft#7261)
  Re-adding animation for drag-n-drop to reorder columns (microsoft#7213)
  Update DetailsList Drag & Drop Example Snapshot (microsoft#7272)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants