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

Nextflow Samplesheet - Pagination #913

Merged
merged 41 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4e8c781
chore: add in intial version of samples_workflow_executions_attribute…
ericenns Jan 10, 2025
fe3a3b8
start playing with formdata
ChrisHuynh333 Jan 14, 2025
6812cf9
get fetch to redirect
ChrisHuynh333 Jan 17, 2025
9f3ef09
furhter changes
ChrisHuynh333 Jan 17, 2025
bae8a97
refactor dropdown and text inputs
ChrisHuynh333 Jan 17, 2025
bd4af87
fix formdata submission, change all cell types to use formdata, simpl…
ChrisHuynh333 Jan 20, 2025
b325bfb
remove cell-type specification, remove more unncessary fields
ChrisHuynh333 Jan 20, 2025
7c1f736
cleanup some test code/code that is now unncessary
ChrisHuynh333 Jan 20, 2025
53112ce
more cleanup, fix file error handling with new form logic
ChrisHuynh333 Jan 20, 2025
a3eb91a
fix processing state after submission
ChrisHuynh333 Jan 20, 2025
2a4a64f
fix how parameter data is added to formdata, add error state for subm…
ChrisHuynh333 Jan 21, 2025
5918131
some cleanup
ChrisHuynh333 Jan 21, 2025
6e201ad
add logic to work with automated workflows
ChrisHuynh333 Jan 21, 2025
1a0007c
normalize and fix component test with new param
ChrisHuynh333 Jan 21, 2025
3bf2b14
change automated workflow logic, cleanup rubocop, cleanup samplesheet js
ChrisHuynh333 Jan 22, 2025
28d5472
fix comment, remove testing pipelines
ChrisHuynh333 Jan 22, 2025
601780f
specify dropdown cell bg colors to fix dark mode
ChrisHuynh333 Jan 23, 2025
4ae7e8c
refactor all cell types to load in via JS
ChrisHuynh333 Jan 24, 2025
7368dae
finish pagination, fix how data is retrieved by table
ChrisHuynh333 Jan 24, 2025
d351580
add/fix how metadata values are updated/handled in samplesheet, speci…
ChrisHuynh333 Jan 27, 2025
91c1591
start cleanup, add comments
ChrisHuynh333 Jan 27, 2025
cd8f693
cleanup to samplesheet params, placeholder naming, add required check…
ChrisHuynh333 Jan 27, 2025
9158617
remove now unused samplesheet components, rename column_component to …
ChrisHuynh333 Jan 27, 2025
172948f
add translations
ChrisHuynh333 Jan 27, 2025
d1555f3
refactor how file selection is handled
ChrisHuynh333 Jan 28, 2025
514253c
change how file and metadata cells are updated after selection
ChrisHuynh333 Jan 28, 2025
f9d7cd6
start cleanup
ChrisHuynh333 Jan 28, 2025
b3363cf
refactor how missing required data is handled
ChrisHuynh333 Jan 28, 2025
52a752d
start adding ui tests, cleanup some unusable old tests
ChrisHuynh333 Jan 29, 2025
29685a2
add aria label to select
ChrisHuynh333 Jan 29, 2025
bae2c4d
remove test pipelines
ChrisHuynh333 Jan 29, 2025
32b195e
fix markup
ChrisHuynh333 Jan 29, 2025
c76e25c
fix view component tests
ChrisHuynh333 Jan 29, 2025
e37fb9c
some cleanup
ChrisHuynh333 Jan 29, 2025
fc73133
fix file selector attachable call
ChrisHuynh333 Jan 29, 2025
fbf363b
cleanup, run normalize, change how errors are listed
ChrisHuynh333 Jan 29, 2025
acf6806
cleanup
ChrisHuynh333 Jan 29, 2025
ce93b8b
avoid rendering pagination if only 1 page, add associated test
ChrisHuynh333 Jan 30, 2025
15f533c
fix border issue with pagination
ChrisHuynh333 Jan 31, 2025
be6dd66
refactor to use spinner component on pipeline selection and submission
ChrisHuynh333 Feb 4, 2025
9b69f5c
remove old file validation logic, fix rubocop warnings
ChrisHuynh333 Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions app/components/nextflow/samplesheet/column_component.rb

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions app/components/nextflow/samplesheet/dropdown_cell_component.rb

This file was deleted.

33 changes: 0 additions & 33 deletions app/components/nextflow/samplesheet/file_cell_component.html.erb

This file was deleted.

22 changes: 0 additions & 22 deletions app/components/nextflow/samplesheet/file_cell_component.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,5 @@
id="<%= "metadata-#{header}-column" %>"
class="dark:bg-slate-700 bg-slate-50"
>
<% samples.each_with_index do |sample, index| %>
<div
style="content-visibility: auto;"
class="border table-td dark:border-slate-600 border-slate-100"
>
<%= fields_for "workflow_execution[samples_workflow_executions_attributes][#{index}]" do |s| %>
<% if property["cell_type"] == "sample_cell" %>
<%= s.hidden_field :sample_id, value: sample.id %>
<% end %>
<%= s.fields_for "samplesheet_params" do |fields| %>
<%= render_cell_type(header, property, sample, fields, index, workflow_params) %>
<% end %>
<% end %>
</div>
<% end %>
</div>
</div>
32 changes: 32 additions & 0 deletions app/components/nextflow/samplesheet/header_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# frozen_string_literal: true

module Nextflow
module Samplesheet
# Renders a header in the sample sheet table
class HeaderComponent < Component
attr_reader :namespace_id, :header, :property, :samples, :metadata_fields, :required_properties, :workflow_params

# rubocop:disable Metrics/ParameterLists
def initialize(namespace_id:, header:, property:, samples:, metadata_fields:, required_properties:,
workflow_params:)
@namespace_id = namespace_id
@header = header
@property = property
@samples = samples
@metadata_fields = metadata_fields
@required_properties = required_properties
@workflow_params = workflow_params
end

# rubocop:enable Metrics/ParameterLists

private

def metadata_fields_for_field(field)
options = @metadata_fields.include?(field) ? @metadata_fields : @metadata_fields.unshift(field)
label = t('.default', label: field)
options.map { |f| [f.eql?(field) ? label : f, f] }
end
end
end
end

This file was deleted.

22 changes: 0 additions & 22 deletions app/components/nextflow/samplesheet/metadata_cell_component.rb

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions app/components/nextflow/samplesheet/sample_cell_component.rb

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions app/components/nextflow/samplesheet/sample_name_cell_component.rb

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions app/components/nextflow/samplesheet/text_cell_component.rb

This file was deleted.

Loading