Skip to content

fix(GlListbox): Stop listbox ENTER event prop

Alexander Turinske requested to merge 2105-stop=enter=propagation into main

What does this MR do?

fix(GlListbox): Stop listbox ENTER event prop

  • in a form, we do not want the form to subit when a user is searching in the textbox for an listbox

Changelog: changed

Screenshots

Before After
namespace_-_before namespace_-_after

How to verify

  1. Apply the following patch to ensure you can access the affected page.
diff --git a/app/assets/javascripts/vue_shared/components/listbox_input/listbox_input.vue b/app/assets/javascripts/vue_shared/components/listbox_input/listbox_input.vue
index 8340ee190845..c29f363f6b0b 100644
--- a/app/assets/javascripts/vue_shared/components/listbox_input/listbox_input.vue
+++ b/app/assets/javascripts/vue_shared/components/listbox_input/listbox_input.vue
@@ -2,7 +2,7 @@
 import { GlFormGroup, GlListbox } from '@gitlab/ui';
 import { __ } from '~/locale';
 
-const MIN_ITEMS_COUNT_FOR_SEARCHING = 10;
+const MIN_ITEMS_COUNT_FOR_SEARCHING = 5;
 
 export default {
   i18n: {
diff --git a/ee/app/controllers/trials_controller.rb b/ee/app/controllers/trials_controller.rb
index 90e15cd0e3e3..95736787cf44 100644
--- a/ee/app/controllers/trials_controller.rb
+++ b/ee/app/controllers/trials_controller.rb
@@ -10,12 +10,12 @@ class TrialsController < ApplicationController
 
   layout 'minimal'
 
-  before_action :check_if_gl_com_or_dev
-  before_action :authenticate_user!, except: [:create_hand_raise_lead]
-  before_action :authenticate_user_404!, only: [:create_hand_raise_lead]
-  before_action :find_or_create_namespace, only: :apply
-  before_action :find_namespace, only: [:extend_reactivate, :create_hand_raise_lead]
-  before_action :authenticate_namespace_owner!, only: [:extend_reactivate]
+  # before_action :check_if_gl_com_or_dev
+  # before_action :authenticate_user!, except: [:create_hand_raise_lead]
+  # before_action :authenticate_user_404!, only: [:create_hand_raise_lead]
+  # before_action :find_or_create_namespace, only: :apply
+  # before_action :find_namespace, only: [:extend_reactivate, :create_hand_raise_lead]
+  # before_action :authenticate_namespace_owner!, only: [:extend_reactivate]
   before_action only: [:new, :select] do
     push_frontend_feature_flag(:gitlab_gtm_datalayer, type: :ops)
   end
  1. Navigate to http://gdk.test:3000/-/trials/select

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • Security reports checked/validated by a reviewer from the AppSec team

Accessibility

If this MR adds or modifies a component, take a few moments to review the following:

  • All actions and functionality can be done with a keyboard.
  • Links, buttons, and controls have a visible focus state.
  • All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label for icons that have meaning or perform actions.
  • Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false" to aria-expanded="true" when an accordion is expanded.
  • Color combinations have sufficient contrast.

Closes #2105 (closed)

Edited by Alexander Turinske

Merge request reports

Loading