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

[pull] dev from opf:dev #231

Merged
merged 131 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
6400bcd
Write a documentation to set up keycloak integration with OpenProject…
SagarGi Mar 28, 2024
4dac95f
Merge branch 'opf:dev' into document_keycloak_with_openproject
SagarGi Apr 3, 2024
f67b0a1
Refactor docs
SagarGi Apr 3, 2024
80dff64
[#55016] Waiting modal doesn't time out
ba1ash May 13, 2024
f705632
[#55133] Handle edge case if unlink fails, render a primer error banner
akabiru May 22, 2024
6b95a9d
feat[Op#55133]: Allow flash messages to be updated via component streams
akabiru May 22, 2024
5810490
feat[Op#55133]: Render flash message and re-render table on stale unlink
akabiru May 22, 2024
d8e2600
fix[Op#55133]: In case of unlink failure, render back error messages
akabiru May 22, 2024
7748431
tests[Op#55133]: Add some basic contract unit specs
akabiru May 22, 2024
1e03bb1
refactor[Op#55133]: Reduce fingerprint in FlashMessagesHelper mixin
akabiru May 22, 2024
d198c66
chore[Op#55133]: rename output safety helper
akabiru May 23, 2024
b2be225
fix[Op#55133]: make it explicit that mappings reuse the same contract
akabiru May 23, 2024
496040e
chore[Op#55133]: use consistent naming for primer banner
akabiru May 24, 2024
6ee6a32
[chore] fixing warnings and examples in relations api docs
Kharonus May 24, 2024
4b4bce2
[#55189] Replace tabs with PageHeader tabs in Files Module
ba1ash May 27, 2024
de25e79
move scope manipulation into filters - applied only to project query
ulferts May 27, 2024
483be76
[#55189] Use PageHeader tabs in admin/settings/project_custom_fields/…
ba1ash May 27, 2024
4145f35
adapt other filter`s scope implementation
ulferts May 27, 2024
7def909
adapt work package filter`s scope implementation
ulferts May 27, 2024
837bcff
adapt order ang group_by to accept the query scope
ulferts May 27, 2024
1487e24
rename order/filter/group_by methods to reflect changed responsibility
ulferts May 27, 2024
0e10a1d
[#55196] Wrong menu entry when deactivating a project attribute (not …
akabiru May 27, 2024
0aa4b5f
fix[Op#55195]: Render blank slate in place of project list for requir…
akabiru May 27, 2024
49ca55e
Correct docs regarding percentageDone and derived values
aaron-contreras May 27, 2024
2e4fe3a
further renaming
ulferts May 27, 2024
07d9fb3
[#54966] Saturday missing in "My spent time" widget in "My page"
dombesz May 27, 2024
602c3b1
add a test for checking that all nested projects routes are reserved
toy May 27, 2024
3668aca
reserve queries from allowed project url identifiers
toy May 27, 2024
261106d
update locales from crowdin [ci skip]
openprojectci May 28, 2024
39420a7
update locales from crowdin [ci skip]
openprojectci May 28, 2024
060fa8a
Merge branch 'release/14.1' into dev
openprojectci May 28, 2024
15cd321
Bump lefthook from 1.6.12 to 1.6.13
dependabot[bot] May 28, 2024
64a5fa9
Bump @typescript-eslint/parser from 7.10.0 to 7.11.0 in /frontend
dependabot[bot] May 28, 2024
e406e1a
Bump @typescript-eslint/eslint-plugin from 7.10.0 to 7.11.0 in /frontend
dependabot[bot] May 28, 2024
4d65329
Merge pull request #15679 from opf/reserve-project-queries
dombesz May 28, 2024
5328abb
Merge pull request #15681 from opf/dependabot/bundler/dev/lefthook-1.…
klaustopher May 28, 2024
a791e0c
Merge pull request #15682 from opf/dependabot/npm_and_yarn/frontend/d…
klaustopher May 28, 2024
fec6929
Merge pull request #15683 from opf/dependabot/npm_and_yarn/frontend/d…
klaustopher May 28, 2024
f130245
Add more details in api docs regarding progress values
cbliard May 28, 2024
e8a5f78
Merge pull request #15678 from opf/bug/54966-saturday-missing-in-my-s…
ulferts May 28, 2024
c584cea
Add a dedicated time matcher and use it instead of `be_within.of`
klaustopher May 28, 2024
a32d4c6
[#55176] Cleanup Rails's tmp/pid/server.pid file for docker based dev…
wielinde May 28, 2024
c21951f
simplify BCF shared response a bit
klaustopher May 28, 2024
ddd1f44
Fix typo
klaustopher May 28, 2024
1a14641
Merge pull request #15684 from opf/add-time-matcher
dombesz May 28, 2024
cd4137e
Add a dedicated time matcher and use it instead of `be_within.of`
klaustopher May 28, 2024
77f13d4
Globally include time helpers
klaustopher May 28, 2024
41a1ec0
Fix BCF comment tests to test for correct timestamps
klaustopher May 28, 2024
9b10bd6
Merge pull request #15686 from opf/time-matcher-flaky-fix
dombesz May 28, 2024
047306a
rely on `where` to ignore nil
ulferts May 28, 2024
697153b
Update storage troubleshooting link.
ba1ash May 28, 2024
d231bbb
Merge branch 'release/14.1' into bug/too-many-requests-from-open-proj…
ba1ash May 28, 2024
be606b0
tests[Op#55196]: update project custom field mappings feature tests
akabiru May 28, 2024
14d343f
tests[Op#55196]: collapse assertions for efficiency
akabiru May 28, 2024
41a1a95
Merge pull request #15675 from opf/fix/replace_merge_in_query
klaustopher May 28, 2024
7ec43b5
Reload work package before comparing its time values
klaustopher May 28, 2024
663f3a1
Merge pull request #15537 from opf/bug/too-many-requests-from-open-pr…
dominic-braeunlein May 28, 2024
370bed7
Merge pull request #15689 from opf/fix-another-issue-in-timing-tests
ulferts May 28, 2024
513732b
Merge branch 'dev' into document_keycloak_with_openproject
ba1ash May 28, 2024
22a876a
Merge pull request #15677 from opf/bug/55293-fix-api-docs-for-percent…
aaron-contreras May 28, 2024
4dd28a5
update locales from crowdin [ci skip]
openprojectci May 29, 2024
d803132
update locales from crowdin [ci skip]
openprojectci May 29, 2024
f4ace1e
Bump the angular group in /frontend with 4 updates
dependabot[bot] May 29, 2024
e4f8f29
Fix typo
HDinger May 29, 2024
6ba8493
Bump eslint-plugin-react from 7.34.1 to 7.34.2 in /frontend
dependabot[bot] May 29, 2024
2972b37
Merge pull request #15692 from opf/merge-release/14.1-20240529033423
klaustopher May 29, 2024
c0ccebc
Merge pull request #15694 from opf/dependabot/npm_and_yarn/frontend/d…
klaustopher May 29, 2024
576e25f
Merge pull request #15693 from opf/dependabot/npm_and_yarn/frontend/d…
ulferts May 29, 2024
8e72feb
[55124] Added pagination for project attributes
May 27, 2024
7c71eed
Possible provided_params already symbolized.
Eric-Guo May 29, 2024
14865f5
Fix rubocop warning: Assignment Branch Condition size for calculate_r…
Eric-Guo May 29, 2024
7c1cd5e
Bump octicons to 19.13.0
HDinger May 29, 2024
b24477b
Replace "remove" button with an icon button
HDinger May 29, 2024
ad5623a
Merge pull request #15697 from opf/housekeeping/bump-octicons-19.13.0
HDinger May 29, 2024
029a059
My page docs update (#15698)
MayaBerd May 29, 2024
28e3bab
Merge pull request #15696 from opf/feature/55230-transform-remove-act…
dombesz May 29, 2024
95b6b0f
chore[Op#55133]: no need for array
akabiru May 29, 2024
4a96dcc
Merge pull request #15695 from Eric-Guo/provided_params_pagesize_not_…
dombesz May 29, 2024
1bfe62c
[55124] Render complete ProjectTable always for project attributes
May 29, 2024
e55095b
Merge pull request #15672 from opf/code-maintenance/55189-replace-tab…
ba1ash May 29, 2024
9e2beba
Merge pull request #15149 from SagarGi/document_keycloak_with_openpro…
ba1ash May 29, 2024
1472e55
Merge pull request #15653 from opf/implementation/55133-handle-edge-c…
akabiru May 29, 2024
d7c6d15
Merge pull request #15676 from opf/bug/55196-wrong-menu-entry-when-de…
akabiru May 29, 2024
0a8a87d
add spec for cancelling saving persisted projects list
toy May 24, 2024
3831a64
make safe_query_params use params instead of request.query_parameters
toy May 27, 2024
b811a4e
allow specifiying safe query params for sort_link/sort_header_tag
toy May 28, 2024
d6f2584
replace blocked_url_params with allowed_params in PaginationHelper
toy May 28, 2024
a3e0b9a
create urls and forms with all query parameters instead of relying on…
toy May 27, 2024
cf0f925
remove unneeded explicit returns in filters stimulus controller
toy May 29, 2024
66cb52d
copy per_page parameter in filters stumulus controller
toy May 29, 2024
a9c316d
refactor filters stimulus controller by using URLSearchParams
toy May 29, 2024
11defe9
extract a constant with names of all projects query params
toy May 29, 2024
543e87a
Fix the pr errors script, show the in progress run even if there is a…
dombesz May 29, 2024
41d97c4
update locales from crowdin [ci skip]
openprojectci May 30, 2024
cf352be
update locales from crowdin [ci skip]
openprojectci May 30, 2024
a22ebdb
Merge branch 'release/14.1' into dev
openprojectci May 30, 2024
732ec78
Merge pull request #15661 from opf/chore/groom-relation-endpoints-in-…
Kharonus May 30, 2024
b571e7c
Merge pull request #15701 from opf/fix-github-script-in-progress
cbliard May 30, 2024
fa5d03e
rubocop safe autocorrect all except Rails/WhereRange
toy May 30, 2024
192e21c
manual rubocop corrections
toy May 30, 2024
b4a40f9
add autocorrections commit to git blame ignore file
toy May 30, 2024
9afc11c
update locales from crowdin [ci skip]
openprojectci May 31, 2024
ad02a66
update locales from crowdin [ci skip]
openprojectci May 31, 2024
353dadb
Bump @fullcalendar/angular in /frontend in the fullcalendar group
dependabot[bot] May 31, 2024
4c6a436
Bump lefthook from 1.6.13 to 1.6.14
dependabot[bot] May 31, 2024
8d06c23
Bump rubocop from 1.64.0 to 1.64.1
dependabot[bot] May 31, 2024
763071b
Merge pull request #15708 from opf/dependabot/bundler/dev/rubocop-1.64.1
ulferts May 31, 2024
2210cca
Merge pull request #15707 from opf/dependabot/bundler/dev/lefthook-1.…
ulferts May 31, 2024
1064f4e
Merge pull request #15706 from opf/dependabot/npm_and_yarn/frontend/d…
ulferts May 31, 2024
56d6f16
Bump primer_view_components to 0.32.0
HDinger May 31, 2024
0604c10
Merge remote-tracking branch 'origin/release/14.1' into dev
ulferts May 31, 2024
bcb91c2
Merge branch 'dev' into implementation/55124-retain-project-list-hier…
May 31, 2024
f29c3a9
attempt to fix flickering spec
ulferts May 31, 2024
82c6329
Merge pull request #15699 from opf/implementation/55124-retain-projec…
May 31, 2024
9405dc4
[#55369] Update work package FAQ (progress bar) https://community.op…
MayaBerd May 31, 2024
f800b69
fix typo
ulferts May 31, 2024
52c9eff
Merge pull request #15628 from opf/rubocop-corrections
ulferts May 31, 2024
e9636dc
Merge pull request #15709 from opf/housekeeping/bump-primer-0-32-0
dombesz May 31, 2024
098cbca
[fix] api spec replace complete with configured
Kharonus May 31, 2024
bc3fb46
Bump primer_view_components to 0.32.1
HDinger May 31, 2024
4328cc2
fix fetching enough commits to diff the merge head with the base
toy May 30, 2024
3515e73
Merge pull request #15703 from opf/fetch-enough
ulferts May 31, 2024
a64e23d
Merge pull request #15712 from opf/fix/storage-api-spec-has-wrong-att…
Kharonus May 31, 2024
77f256f
create a separate helper for sort param names
toy May 31, 2024
b34c93e
remove unused expand option from default allowed parameters in pagina…
toy May 31, 2024
4fbc002
[#55381] The available_projects api endpoint displays custom project …
dombesz May 31, 2024
7df5839
Merge pull request #15680 from opf/bug/53329-query-lost-when-sorting-…
ulferts May 31, 2024
a94de8e
Merge pull request #15710 from opf/bug/55381-the-available_projects-a…
dombesz May 31, 2024
4e5b6f6
update locales from crowdin [ci skip]
openprojectci Jun 1, 2024
0541e03
update locales from crowdin [ci skip]
openprojectci Jun 1, 2024
c978859
Merge branch 'release/14.1' into dev
openprojectci Jun 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
21a696ef9b170e14ad2daf53364a4c2113822c2f
# Update copyright information for 2024
c795874f7f281297bbd3bad2fdb58b24cb4ce624
# switch to double quotes
# rubocop autocorrections
f3c99ee5dded81ad55f2b6f3706216d5fa765677
5c72ea0046a6b5230bf456f55a296ed6fd579535
9e4934cd0a468f46d8f0fc0f11ebc2d4216f789c
6678cab48d443b5782fa93b171d62093819ee4fc
fa5d03eae00bc8931f99598a74ffd76e0cbca3da
10 changes: 2 additions & 8 deletions .github/workflows/rubocop-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch all commits for PR branch plus head commit of base branch
run: |
# fetch all commits of the PR branch
git fetch --shallow-exclude "${{ github.base_ref }}" origin "${{ github.ref }}"
# fix for "fatal: error in object: unshallow"
git repack -d
# fetch head commit of base branch
git fetch --deepen 1 origin "${{ github.ref }}"
with:
fetch-depth: 2 # we are comparing PR merge head with base
- uses: ruby/setup-ruby@v1
- uses: opf/action-rubocop@master
with:
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,6 @@ gemfiles.each do |file|
send(:eval_gemfile, file) if File.readable?(file)
end

gem "openproject-octicons", "~>19.12.0"
gem "openproject-octicons_helper", "~>19.12.0"
gem "openproject-primer_view_components", "~>0.31.0"
gem "openproject-octicons", "~>19.13.0"
gem "openproject-octicons_helper", "~>19.13.0"
gem "openproject-primer_view_components", "~>0.32.1"
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ GEM
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
lefthook (1.6.12)
lefthook (1.6.14)
letter_opener (1.10.0)
launchy (>= 2.2, < 4)
letter_opener_web (3.0.0)
Expand Down Expand Up @@ -767,12 +767,12 @@ GEM
validate_email
validate_url
webfinger (~> 2.0)
openproject-octicons (19.12.0)
openproject-octicons_helper (19.12.0)
openproject-octicons (19.13.0)
openproject-octicons_helper (19.13.0)
actionview
openproject-octicons (= 19.12.0)
openproject-octicons (= 19.13.0)
railties
openproject-primer_view_components (0.31.0)
openproject-primer_view_components (0.32.1)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
openproject-octicons (>= 19.12.0)
Expand All @@ -790,7 +790,7 @@ GEM
parallel (1.24.0)
parallel_tests (4.7.1)
parallel
parser (3.3.1.0)
parser (3.3.2.0)
ast (~> 2.4.1)
racc
pdf-core (0.9.0)
Expand Down Expand Up @@ -967,7 +967,7 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.1)
rubocop (1.64.0)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -1262,10 +1262,10 @@ DEPENDENCIES
openproject-job_status!
openproject-ldap_groups!
openproject-meeting!
openproject-octicons (~> 19.12.0)
openproject-octicons_helper (~> 19.12.0)
openproject-octicons (~> 19.13.0)
openproject-octicons_helper (~> 19.13.0)
openproject-openid_connect!
openproject-primer_view_components (~> 0.31.0)
openproject-primer_view_components (~> 0.32.1)
openproject-recaptcha!
openproject-reporting!
openproject-storages!
Expand Down
38 changes: 18 additions & 20 deletions app/components/admin/attachments_settings_header_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,23 @@ See COPYRIGHT and LICENSE files for more details.

<% helpers.html_title t(:label_administration), @title %>

<%= render(Primer::OpenProject::PageHeader.new(border_bottom: 0)) do |header| %>
<% header.with_title { t(:"attributes.attachments") } %>
<% header.with_breadcrumbs([{ href: admin_index_path, text: t("label_administration") },
{ href: admin_settings_storages_path, text: t("project_module_storages") },
t(:"attributes.attachments")]) %>
<% end %>

<%= render(Primer::Alpha::TabNav.new(label: "label")) do |component|
component.with_tab(selected: @selected == 1, href: admin_settings_attachments_path) do |tab|
tab.with_text { t("settings.general") }
end
component.with_tab(selected: @selected == 2, href: admin_settings_virus_scanning_path) do |tab|
tab.with_icon(icon: :"op-enterprise-addons") unless EnterpriseToken.allows_to?("virus_scanning")
tab.with_text { t(:"settings.antivirus.title") }
end
if User.current.admin? && (EnterpriseToken.allows_to?(:virus_scanning) || Attachment.status_quarantined.any?)
component.with_tab(selected: @selected == 3, href: admin_quarantined_attachments_path) do |tab|
tab.with_text { t(:"antivirus_scan.quarantined_attachments.title") }
<%= render(Primer::OpenProject::PageHeader.new(border_bottom: 0)) do |header|
header.with_title { t(:"attributes.attachments") }
header.with_breadcrumbs([{ href: admin_index_path, text: t("label_administration") },
{ href: admin_settings_storages_path, text: t("project_module_storages") },
t(:"attributes.attachments")])
header.with_tab_nav(label: nil) do |tab_nav|
tab_nav.with_tab(selected: @selected == 1, href: admin_settings_attachments_path) do |tab|
tab.with_text { t("settings.general") }
end
tab_nav.with_tab(selected: @selected == 2, href: admin_settings_virus_scanning_path) do |tab|
tab.with_icon(icon: :"op-enterprise-addons") unless EnterpriseToken.allows_to?("virus_scanning")
tab.with_text { t(:"settings.antivirus.title") }
end
if User.current.admin? && (EnterpriseToken.allows_to?(:virus_scanning) || Attachment.status_quarantined.any?)
tab_nav.with_tab(selected: @selected == 3, href: admin_quarantined_attachments_path) do |tab|
tab.with_text { t(:"antivirus_scan.quarantined_attachments.title") }
end
end
end
end
%>
end %>

This file was deleted.

2 changes: 1 addition & 1 deletion app/components/members/table_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TableComponent < ::TableComponent # rubocop:disable OpenProject/AddPreview
sortable_columns :name, :mail, :status

def apply_sort(model)
apply_member_scopes super(model)
apply_member_scopes super
end

def apply_member_scopes(model)
Expand Down
2 changes: 1 addition & 1 deletion app/components/members/user_filter_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def filter_shares(query, role_id)
end

def apply_filters(params, query)
super(params, query)
super
filter_shares(query, params[:shared_role_id]) if params.key?(:shared_role_id)

query
Expand Down
11 changes: 5 additions & 6 deletions app/components/projects/configure_view_modal_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
<%= primer_form_with(
url: projects_path,
id: QUERY_FORM_ID,
method: :get,
data: {
controller: "params-from-query",
'application-target': "dynamic",
'params-from-query-allowed-value': '["filters", "query_id", "page", "per_page"]'
}) do |form| %>
method: :get
) do |form| %>
<% helpers.projects_query_params.except(:columns, :sortBy).each do |name, value| %>
<%= hidden_field_tag name, value %>
<% end %>
<%= render(Primer::Alpha::TabPanels.new(label: "label")) do |tab_panel| %>
<% tab_panel.with_tab(selected: true, id: "tab-selects") do |tab| %>
<% tab.with_text { I18n.t("label_columns") } %>
Expand Down
8 changes: 2 additions & 6 deletions app/components/projects/export_list_modal_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
id: MODAL_ID)) do |d| %>
<% d.with_header(variant: :large) %>
<% d.with_body do %>
<ul class="op-export-options"
data-controller="params-from-query"
data-application-target="dynamic"
data-params-from-query-all-anchors-value="true"
data-params-from-query-allowed-value='["query_id", "filters", "sortBy", "columns"]'>
<ul class="op-export-options">
<% helpers.supported_export_formats.each do |key| %>
<li class="op-export-options--option">
<%= link_to url_for(action: 'index', format: key),
<%= link_to projects_path(format: key, **helpers.projects_query_params.except(:page, :per_page)),
class: 'op-export-options--option-link' do %>
<%= helpers.op_icon("icon-big icon-export-#{key}") %>
<span class="op-export-options--option-label"><%= t("export.format.#{key}") %></span>
Expand Down
31 changes: 20 additions & 11 deletions app/components/projects/index_page_header_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
header:,
message: t("lists.can_be_saved"),
label: t("button_save"),
href: projects_query_path(query),
href: projects_query_path(query, projects_query_params),
method: :patch
)
elsif can_save_as?
header_save_action(
header:,
message: t("lists.can_be_saved_as"),
label: t("button_save_as"),
href: new_projects_query_path
href: new_projects_query_path(projects_query_params)
)
end

Expand Down Expand Up @@ -59,11 +59,20 @@
end

if can_save?
menu_save_item(menu:, label: t('button_save'), href: projects_query_path(query), method: :patch)
menu_save_item(
menu:,
label: t('button_save'),
href: projects_query_path(query, projects_query_params),
method: :patch
)
end

if may_save_as?
menu_save_item(menu:, label: t('button_save_as'), href: new_projects_query_path)
menu_save_item(
menu:,
label: t('button_save_as'),
href: new_projects_query_path(projects_query_params)
)
end

menu.with_item(
Expand Down Expand Up @@ -123,15 +132,15 @@
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title(data: { 'test-selector': 'project-query-name'}) do
primer_form_with(model: query,
url: @query.new_record? ? projects_queries_path : projects_query_path(@query),
url: @query.new_record? ? projects_queries_path(projects_query_params) : projects_query_path(@query, projects_query_params),
scope: 'query',
data: {
controller: "params-from-query",
'application-target': "dynamic",
'params-from-query-allowed-value': '["filters", "columns", "query_id", "sortBy"]'
},
id: 'project-save-form') do |f|
render(Queries::Projects::Form.new(f, query:))
render(
Queries::Projects::Form.new(
f,
cancel_url: projects_path(**projects_query_params, **{ query_id: query.id }.compact)
)
)
end
end
header.with_breadcrumbs(breadcrumb_items)
Expand Down
16 changes: 4 additions & 12 deletions app/components/projects/index_page_header_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Projects::IndexPageHeaderComponent < ApplicationComponent

STATE_OPTIONS = %i[show edit rename].freeze

delegate :projects_query_params, to: :helpers

def initialize(current_user:, query:, params:, state: :show)
super

Expand Down Expand Up @@ -136,12 +138,7 @@ def header_save_action(header:, message:, label:, href:, method: nil)
mobile_icon: nil, # Do not show on mobile as it is already part of the menu
mobile_label: nil,
href:,
data: {
method:,
controller: "params-from-query",
"application-target": "dynamic",
"params-from-query-allowed-value": '["filters", "columns", "sortBy", "query_id"]'
}.compact
data: { method: }
) do
render(
Primer::Beta::Octicon.new(
Expand All @@ -159,12 +156,7 @@ def menu_save_item(menu:, label:, href:, method: nil)
label:,
href:,
content_arguments: {
data: {
method:,
controller: "params-from-query",
"application-target": "dynamic",
"params-from-query-allowed-value": '["filters", "columns", "sortBy", "query_id"]'
}.compact
data: { method: }
}
) do |item|
item.with_leading_visual_icon(icon: :"op-save")
Expand Down
2 changes: 1 addition & 1 deletion app/components/projects/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def action_menu
label:,
test_selector: "project-list-row--action-menu-item",
content_arguments: button_options) do |item|
item.with_leading_visual_icon(icon:)
item.with_leading_visual_icon(icon:) if icon
end
end
end
Expand Down
13 changes: 2 additions & 11 deletions app/components/projects/table_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ See COPYRIGHT and LICENSE files for more details.
<% if column.attribute == :hierarchy %>
<th id="project-table--hierarchy-header">
<div class="generic-table--sort-header-outer generic-table--sort-header-outer_no-highlighting">
<div class="generic-table--sort-header"
data-controller="params-from-query"
data-application-target="dynamic"
data-params-from-query-all-anchors-value="true"
data-params-from-query-allowed-value='["query_id", "per_page", "filters", "columns"]'>
<div class="generic-table--sort-header">
<%= content_tag :a,
helpers.op_icon("icon-hierarchy"),
href: href_only_when_not_sort_lft,
Expand Down Expand Up @@ -102,10 +98,5 @@ See COPYRIGHT and LICENSE files for more details.
</div>

<% if paginated? %>
<div data-controller="params-from-query"
data-application-target="dynamic"
data-params-from-query-all-anchors-value="true"
data-params-from-query-allowed-value='["query_id", "columns"]'>
<%= helpers.pagination_links_full model, { blocked_url_params: [:query_id, :columns] } %>
</div>
<%= helpers.pagination_links_full model, allowed_params: %i[query_id filters columns sortBy] %>
<% end %>
Loading
Loading