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

Nav Block - enable page creation from within Block #19775

Merged
merged 171 commits into from
Feb 17, 2020

Commits on Feb 14, 2020

  1. Configuration menu
    Copy the full SHA
    49ef0eb View commit details
    Browse the repository at this point in the history
  2. Styling and i18n

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    6758a60 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f3f74f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7046ff8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1269745 View commit details
    Browse the repository at this point in the history
  6. Add state and UI to represent link being in a resolving/loading state

    This is require to accommodate the new async mode for setting a link. For example when a Page is being created async with the API.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    0ff7ddf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    78cf21a View commit details
    Browse the repository at this point in the history
  8. actually create pages, not posts

    marekhrabe authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    4dc6b3c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9ce1457 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    79f4db7 View commit details
    Browse the repository at this point in the history
  11. Add more test use case data

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    b4a26cd View commit details
    Browse the repository at this point in the history
  12. extract API call to prop function

    marekhrabe authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    46b5312 View commit details
    Browse the repository at this point in the history
  13. swap api fetch with dispatch

    marekhrabe authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    6e5dd16 View commit details
    Browse the repository at this point in the history
  14. Improve a11y of label

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    0aa60c6 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    cf9cd62 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c7863bb View commit details
    Browse the repository at this point in the history
  17. Fix tests to avoid edge cases

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    8e29dad View commit details
    Browse the repository at this point in the history
  18. Fix test to expose bug in implementation

    Previously both tests would pass even though when testing in browser (using real API requests) the one with spaces would fail.
    
    This is because the mocked API always results results which ensures that suggestinos are always shown. However, if the API doesn’t return any results then URLInput has no suggestions state and so the suggestions dropdown doesn’t display which causes the Create Page option also not display. In fact it should display.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    b9f4d80 View commit details
    Browse the repository at this point in the history
  19. Fix bug introduced in tests

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    f32ea3c View commit details
    Browse the repository at this point in the history
  20. Hide Create option if suggestion is a single Direct (URL) result only.

    This is becase we shouldn’t create pages from anything that looks like a Direct Entry URL.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    2f31fa7 View commit details
    Browse the repository at this point in the history
  21. remove temporary loading state

    marekhrabe authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    a410810 View commit details
    Browse the repository at this point in the history
  22. Promote Create button to top level suggestion.

    Previously the Create button was not part of the proper suggestions state. This caused several issues:
    
    1. The Create option was only shown if there were suggestions (not what we want in certain circumstances)
    2. It wasn’t possible to use keyboard to move to the Create button.
    3. a11y concerns regarding having Create option outside of the true suggestions.
    
    We now make the searchSuggestions handler always append a special suggestion to the result set for create. This is a reserved suggestion which is only displayed in the UI when the appropriate conditions are met.
    
    Also fixes bug with un-needed call to `setIsEditingLink( false )` in async `onChange` handler causes invalid test failures.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    a59b971 View commit details
    Browse the repository at this point in the history
  23. Reinstate full test conditions

    Left some commented out test conditions. These have revealed that the previous commit did not fix the outstanding broken tests.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    38e9be5 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    9914409 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    e148a12 View commit details
    Browse the repository at this point in the history
  26. Improve test code comments

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    5f24acb View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    4370ff1 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    55f3e26 View commit details
    Browse the repository at this point in the history
  29. Improve code comments around promoting CREATE option to a first class…

    … suggestion
    
    This code is particularly ambiguous. Adding a clear comment here should remove a lot of confusion as to why this particular work around is required. It is far from ideal but without decoupling `LinkContorl` from `URLInput` it is necessary.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    139bedf View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    11e40f2 View commit details
    Browse the repository at this point in the history
  31. Use generated Ids for id prop of faux suggestions rather than ever …

    …decrementing static negative numbers
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    28ee868 View commit details
    Browse the repository at this point in the history
  32. Remove Create option from initial suggestions

    Addresses #18900 (comment)
    
    If we need to reinstate this functionality we can simply revert this commit.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c6cab25 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    c93a877 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    92c73e3 View commit details
    Browse the repository at this point in the history
  35. Catch invalid saveEntityRecord response types and throw error

    Throwing here causes a rejected Promise to be returned from `createEntity`. This is then caught and handled inside `LinkControl` in order to centralise error handling.
    
    This area will need additional safeguards adding to catch response types which are errors or which don’t confirm to the expected format of `entity`.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c1c1f18 View commit details
    Browse the repository at this point in the history
  36. Add Error handling to LinkControl for Creating Entities

    If `createEntities` promise is rejected then the erorr is caught and handled and an appropriate error notice is shown to the user.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c3048be View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    47a2351 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    0799ed8 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    6bc9df0 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    1949c91 View commit details
    Browse the repository at this point in the history
  41. Remove forceUpdate

    This doesn’t actually work. Removing.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    9206a44 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    6cebe7c View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    26aa318 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    83bef9f View commit details
    Browse the repository at this point in the history
  45. Resolve rebase errors

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    7bacea1 View commit details
    Browse the repository at this point in the history
  46. Removes unused keypress handler.

    This appears never to be called. The prop is not used directly within `URLInput` or “spread” from the passed props. Testing by adding console.log and running the tests confirms that the code is not being run. Manual testing also.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    8d10183 View commit details
    Browse the repository at this point in the history
  47. Remove redundant onKeyDown prop

    Again onKeyDown prop is not used within `URLInput`. Nor is it spread from props. Never called in tests. Not called when testing manually either.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    7a644a2 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    5b959d9 View commit details
    Browse the repository at this point in the history
  49. Fix to allow keyboard and form submit to handle entity creation

    Previously only mouse click on the “create” suggestion correctly created a new entity. Improved by ensuring the form `onSubmit` handler also correctly triggers the onCreate handler if the suggestion type is the “create” type.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    7cd70f2 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    decd4de View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    0f09491 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    4c7206a View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    3263b5e View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    cc9bc97 View commit details
    Browse the repository at this point in the history
  55. Add i18n for Loading state

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c28a41f View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    579490c View commit details
    Browse the repository at this point in the history
  57. Fixes render conditionals to be mutually exclusive

    Rebasing with master caused conditionals to be normalised into one. Now we have `isResolving` as state we need to ensure the component renders differently with this conditional involved. The clearest means of doing this is to break the render up into exclusive sections based on conditions.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    faaf3fa View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    db73fd5 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    c644a60 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    8203176 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    fe7a96f View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    3263bb5 View commit details
    Browse the repository at this point in the history
  63. Reduced padding on bottom of LinkControl list results and moved error…

    … message up to match design specs more closely.
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    b192520 View commit details
    Browse the repository at this point in the history
  64. Only add separator when it needs separating

    We only need a separator when there are other suggestions the Create button needs separation from.
    obenland authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    ee4ce2c View commit details
    Browse the repository at this point in the history
  65. Committed formatted js

    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    996a992 View commit details
    Browse the repository at this point in the history
  66. Fixed broken unit test for checking 'Loading' string instead of updat…

    …ed 'Creating' string
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    b5e0856 View commit details
    Browse the repository at this point in the history
  67. Removed uniqueID from Manual URLs in Navigation Link results from Lin…

    …k Control
    
    Based on discussion about how to handle link results, I've removed the uniqueId as we may not need an ID at all for manual link results. Other possibilities are to include the ID property again and either set it to null or to the URL value
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    f6adf54 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    81e2c4d View commit details
    Browse the repository at this point in the history
  69. Update packages/block-editor/src/components/link-control/index.js

    Co-Authored-By: Andrew Duthie <andrew@andrewduthie.com>
    getdave and aduth committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    5780610 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    fb135c1 View commit details
    Browse the repository at this point in the history
  71. Remove unnecessary cast to Boolean

    Co-Authored-By: Andrew Duthie <andrew@andrewduthie.com>
    getdave and aduth committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    f67c538 View commit details
    Browse the repository at this point in the history
  72. Update to utilise rendered title value.

    Co-Authored-By: Andrew Duthie <andrew@andrewduthie.com>
    getdave and aduth committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c38f072 View commit details
    Browse the repository at this point in the history
  73. Remove redundant prop usage

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    6f97a87 View commit details
    Browse the repository at this point in the history
  74. Restore commented out test

    This should never have been committed with commented out code.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    015e5d3 View commit details
    Browse the repository at this point in the history
  75. Update to invert create entity “type” dependency

    Previously `LInkControl` was specifiying the type of `page`. This meant it was “aware” of the entity being created. This commit inverts that so that the consuming component is now required to define the type itself (this has been updated on Nav Block).
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    5fe3d2a View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    a623d85 View commit details
    Browse the repository at this point in the history
  77. Fix so that CREATE option not displayed if result is a direct entry URL

    Also amends tests which were incorrectly asserting.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    e2aff99 View commit details
    Browse the repository at this point in the history
  78. Fix typo

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    704341c View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    c81c7a7 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    27d534c View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    1bbd5d3 View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    4119ddb View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    64fc2b2 View commit details
    Browse the repository at this point in the history
  84. Reinstate descriptive function name

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    313dad2 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    22a207f View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    3ef5de4 View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    01b9727 View commit details
    Browse the repository at this point in the history
  88. Remove unused timeout HOC

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    3049729 View commit details
    Browse the repository at this point in the history
  89. Fix misnamed property

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c63f8e1 View commit details
    Browse the repository at this point in the history
  90. Configuration menu
    Copy the full SHA
    7496092 View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    52dd8fe View commit details
    Browse the repository at this point in the history
  92. Set url items from LinkControl to have sanitized url as the id and up…

    …dated e2e snapshot
    
    Based on conversations around potential issues with not including an id on navigation links, the ID has been added back in as the sanitized url as it should be fairly unique and not actually matter if it's unique.
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    07463be View commit details
    Browse the repository at this point in the history
  93. Reinstate keyboard handling of suggestion selection bug fix.

    Failing to pass the current input value as `url` of the suggestion causes the keyboard handling to break when hitting `ENTER`. Not entirely sure why at this stage.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    79c6064 View commit details
    Browse the repository at this point in the history
  94. Update comment to better reflect need for title and url props to …

    …reflect input text value
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    a6bd883 View commit details
    Browse the repository at this point in the history
  95. Remove unwanted reference to entity type.

    The more generic we keep the errors the simpler this component needs to be.
    
    Addresses #19775 (comment)
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    f2609b6 View commit details
    Browse the repository at this point in the history
  96. Corrects usage of aria-label and aria-labelled by on the link control…

    … search results
    
    Use aria-labelledby to reference the visible label ID
    Use aria-label when no visible label
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    e176aa1 View commit details
    Browse the repository at this point in the history
  97. Configuration menu
    Copy the full SHA
    7149b44 View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    6dae057 View commit details
    Browse the repository at this point in the history
  99. Configuration menu
    Copy the full SHA
    ff4701d View commit details
    Browse the repository at this point in the history
  100. accomodate for self-closing link popover after selecting link (preven…

    …ts react error)
    marekhrabe authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    435778c View commit details
    Browse the repository at this point in the history
  101. Configuration menu
    Copy the full SHA
    53ec1d5 View commit details
    Browse the repository at this point in the history
  102. Configuration menu
    Copy the full SHA
    ac3eb3d View commit details
    Browse the repository at this point in the history
  103. Configuration menu
    Copy the full SHA
    9f004ca View commit details
    Browse the repository at this point in the history
  104. Configuration menu
    Copy the full SHA
    0aaa082 View commit details
    Browse the repository at this point in the history
  105. Remove unwanted whitespace.

    Co-Authored-By: Andrew Duthie <andrew@andrewduthie.com>
    getdave and aduth committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    5615e7f View commit details
    Browse the repository at this point in the history
  106. Rename var to lowercase

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    9a04df7 View commit details
    Browse the repository at this point in the history
  107. Avoid unwanted arial-label* roles for visually hidden elements

    `aria-labelledby` is only suitable when the referenced element is visible.
    
    `aria-label` should not be used to duplicate content already accessible within the element.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    56ea4d1 View commit details
    Browse the repository at this point in the history
  108. Move cancellable refs to component scope.

    Partially addresses #19775 (comment)
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    2530978 View commit details
    Browse the repository at this point in the history
  109. Lightened border color between link control suggestions and create ne…

    …w page button
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    56fabd5 View commit details
    Browse the repository at this point in the history
  110. Configuration menu
    Copy the full SHA
    483ecc1 View commit details
    Browse the repository at this point in the history
  111. Configuration menu
    Copy the full SHA
    7e25eea View commit details
    Browse the repository at this point in the history
  112. Make page title of new page creation darker

    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    bf754e4 View commit details
    Browse the repository at this point in the history
  113. Configuration menu
    Copy the full SHA
    a1b09d3 View commit details
    Browse the repository at this point in the history
  114. Configuration menu
    Copy the full SHA
    9ea5142 View commit details
    Browse the repository at this point in the history
  115. Configuration menu
    Copy the full SHA
    a239257 View commit details
    Browse the repository at this point in the history
  116. Correct test to look for new Create button wording

    Changed due to Design request to change text but test was not updated.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    a93821d View commit details
    Browse the repository at this point in the history
  117. Fix to use cancelable async handler and call stopEditing

    Previously only the keyboard version of handleCreate was cancellable and treated as async. Now the onClick mouse version is also cancellable.
    
    Moreover we call stopEditing() correctly on resolve.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    86dfc0d View commit details
    Browse the repository at this point in the history
  118. Configuration menu
    Copy the full SHA
    b115c9f View commit details
    Browse the repository at this point in the history
  119. Configuration menu
    Copy the full SHA
    0842cc4 View commit details
    Browse the repository at this point in the history
  120. Configuration menu
    Copy the full SHA
    219af6b View commit details
    Browse the repository at this point in the history
  121. Configuration menu
    Copy the full SHA
    e3db29c View commit details
    Browse the repository at this point in the history
  122. Configuration menu
    Copy the full SHA
    2a6103c View commit details
    Browse the repository at this point in the history
  123. Correct spelling typos

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    2978a24 View commit details
    Browse the repository at this point in the history
  124. Configuration menu
    Copy the full SHA
    05c4982 View commit details
    Browse the repository at this point in the history
  125. Fix missing references

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c2ff268 View commit details
    Browse the repository at this point in the history
  126. Configuration menu
    Copy the full SHA
    6de5fa1 View commit details
    Browse the repository at this point in the history
  127. Removes unnecessary closing of Link UI

    Calling setIsLinkOpen in the useEffect was causing setIsLinkOpen to be called twice. The act of moving focus back to the label is enough to trigger setIsLinkOpen to be called by the `Popover` onClose handler. Trying to call it again in the effect caused an error to be thrown regarding setting state on the unmounted component.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    97d1050 View commit details
    Browse the repository at this point in the history
  128. Configuration menu
    Copy the full SHA
    50f436d View commit details
    Browse the repository at this point in the history
  129. Configuration menu
    Copy the full SHA
    e30d545 View commit details
    Browse the repository at this point in the history
  130. Update e2e snapshot

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    1065983 View commit details
    Browse the repository at this point in the history
  131. Revert "Update e2e snapshot"

    This reverts commit 98f7e9e.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    8df3050 View commit details
    Browse the repository at this point in the history
  132. Wait for rich-text to be focused instead of waiting for link control …

    …to disappear in e2e test
    
    We can't rely on the .block-editor-link-control__search-results-wrapper to be hidden, as there's a quick loading state between when that disappears and the link is focused. Waiting for the link to be focused allows this test to be passed while also checking that focus is placed correctly.
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    d42cc27 View commit details
    Browse the repository at this point in the history
  133. Added a check on the active element to make sure the focused block ma…

    …tches our newly created page title
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    dd5d124 View commit details
    Browse the repository at this point in the history
  134. Update test to target specific input field for focus state rather tha…

    …n wrapper
    
    Previously the test was checking for focus on a <div>. Amended to target the <input /> element as that is what actually will receive focus.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    58b3823 View commit details
    Browse the repository at this point in the history
  135. Refactor e2e test to be absolutelty 100% sure we’re in the input befo…

    …re typing
    
    Previously the tests were less than strict about whether the focus was in the input element. Improve this across all tests.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    3c5b712 View commit details
    Browse the repository at this point in the history
  136. Configuration menu
    Copy the full SHA
    2867ebf View commit details
    Browse the repository at this point in the history
  137. Ensure Create button is “in view” by removing other results.

    It’s possible that on certain screen sizes there is not enough room to display the Create button without having to scroll the LinkContorl seaerch results panel. This could cause the selection of the button to fail.
    
    Testing if this fixes the broken e2e tests or at least makes them more resilient.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    bd8f05c View commit details
    Browse the repository at this point in the history
  138. Configuration menu
    Copy the full SHA
    156312d View commit details
    Browse the repository at this point in the history
  139. Updated routes on mock responses in e2e navigation tests and snapshot…

    …s to hopefully make e2e tests easier to debug
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    e524060 View commit details
    Browse the repository at this point in the history
  140. Configuration menu
    Copy the full SHA
    b4c932f View commit details
    Browse the repository at this point in the history
  141. Configuration menu
    Copy the full SHA
    73eeefc View commit details
    Browse the repository at this point in the history
  142. Configuration menu
    Copy the full SHA
    0087c57 View commit details
    Browse the repository at this point in the history
  143. Fixed xpath selector in updateActiveNavigationLink and made the searc…

    …h page term more unique
    jeryj authored and getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    24c3680 View commit details
    Browse the repository at this point in the history
  144. Remove duplicate error notice

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    8a3e9f2 View commit details
    Browse the repository at this point in the history
  145. Remove superflous prop

    Introduced via rebase (again).
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    6137f6f View commit details
    Browse the repository at this point in the history
  146. Simply listbox labelling for a11y

    As per this thread in WPOrg Slack (https://wordpress.slack.com/archives/C02RP4X03/p1581500184181100) it’s better to have a HTML based label over aria labels under all circumstances. Therefore despite what it says on MDN docs for listbox (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role) we simplify to only use a HTML label and refer to that with aria-labelledby.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    a2c7667 View commit details
    Browse the repository at this point in the history
  147. Configuration menu
    Copy the full SHA
    8b29067 View commit details
    Browse the repository at this point in the history
  148. Configuration menu
    Copy the full SHA
    cd9ab52 View commit details
    Browse the repository at this point in the history
  149. Handle cancellable handler props using refs

    Addresses #19775 (comment). Previously we were treating a functional component as though it would live forever when in fact it could easily be unmounted and all internal var references wiped.
    
    Using refs solves this as they persiste between renders.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    2fe9a5c View commit details
    Browse the repository at this point in the history
  150. Fix Promise flow so that stopEditing is not called on createSuggestio…

    …n error and error message is shown
    
    There were several problems here.
    
    * Originally the handleCreate method did `return` with a undefined value when the error was cancelled. This caused incorrect logic flows.
    * The `stopEditing` method was being called even if the Promise flow was handling an error state. This caused the “Currently selected” UI to show with an `undefined` value.
    * The `errorMessage` state was being reset ever time the input “changed”. This meant the error set in the Promise chain was being reset before it could be displayed.
    
    Fixing all the above issues has resolved the errors.
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    415d4d5 View commit details
    Browse the repository at this point in the history
  151. Fix rebase regressions.

    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c6305e6 View commit details
    Browse the repository at this point in the history
  152. Remove cleanForSlug

    This was used to try and “clean” the id primarily to make it valid as a React key. However we’ve discovered that any string is potentially valid. Moreover cleanForSlug might end up making two urls that are otherwise distinct become identical via stripping out of various parts of the full URL.
    
    See #19775 (comment)
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    6289a0c View commit details
    Browse the repository at this point in the history
  153. Configuration menu
    Copy the full SHA
    e9845da View commit details
    Browse the repository at this point in the history
  154. Fix e2e test snapshot to account for using full URL as the suggestion…

    … prop without cleanForSlug
    getdave committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    4b10550 View commit details
    Browse the repository at this point in the history
  155. Configuration menu
    Copy the full SHA
    d54a682 View commit details
    Browse the repository at this point in the history
  156. Configuration menu
    Copy the full SHA
    ef0c09c View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2020

  1. Configuration menu
    Copy the full SHA
    c11ff36 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3a6e8e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4b51533 View commit details
    Browse the repository at this point in the history
  4. Fix to not render create button if there is no search term.

    This was a throw back to a previous state of the `LinkControl` component whereby we wanted to render a create option to allow the user to create blank pages. This was removed as a requirement but the component was not fixed to account for that.
    
    Addresses: #19775 (comment)
    getdave committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    d081116 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    05e0b42 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    382683f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    df38a5d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cbe4bd7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c5e1130 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    437ed18 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8bd0c1e View commit details
    Browse the repository at this point in the history
  12. Consolidate createSuggestion handling logic within single method

    Previously the code to handle the async flow including error handling was duplicated across two handler props. Consolidating helps DRY things and avoid accidental errors being introduced.
    
    Addresses #19775 (comment)
    getdave committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    f70a2bc View commit details
    Browse the repository at this point in the history
  13. Add punctuation to comments

    getdave committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    665f76e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ab1a199 View commit details
    Browse the repository at this point in the history
  15. Fix broken comment

    getdave committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    9a0e6b1 View commit details
    Browse the repository at this point in the history