Skip to content

Created Issues list Vue component

Constance Okoghenun requested to merge 57402-issues-list-vue-component into master

What does this MR do?

This MR creates a Vue component to render issues list. The component will render a list of issues for a project, group or user dashboard. It will fetch relevant issues data from the Issues API applying the correct filters either from the issues search bar or URL parameters in the issues page.

It is behind a feature toggle and is not enabled for any of the current issues list views. In subsequent MR's it will be enabled for Project, Groups, and Dashboard Issues lists.

You can find the EE version of this MR here: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14100

How to run locally on your GDK

The guide is to enable rendering of this component for group issues

  • Make the following change to app/views/groups/issues.html.haml
-  = render 'shared/issues'
+  %div{ id: 'js-issues-list', data: { endpoint: expose_url(api_v4_groups_issues_path(id: @group.id)), 'can-update': @can_bulk_update.to_json, 'create-path': '', "empty-state-svg-path" => image_path('illustrations/issues.svg'), "empty-state-loading-disabled-svg-path" => image_path('illustrations/issue-dashboard_results-without-filter.svg') } }  
  • Make the following change to app/assets/javascripts/pages/dashboard/issues/index.js
+import initIssuesList from '~/issues';
import projectSelect from '~/project_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
import { FILTERED_SEARCH } from '~/pages/constants';

document.addEventListener('DOMContentLoaded', () => {
-  initFilteredSearch({
-    page: FILTERED_SEARCH.ISSUES,
-    filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
-  });
+  if (gon.features.issuesVueComponent) {
+    initIssuesList();
+  } else {
+    initFilteredSearch({
+      page: FILTERED_SEARCH.ISSUES,
+      filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
+    });

-  projectSelect();
+    projectSelect();
+  }
});
  • Visit any group issues page on your GDK

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

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
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #57402 (moved)

Edited by Donald Cook

Merge request reports

Loading