diff --git a/app/assets/stylesheets/experiments.scss b/app/assets/stylesheets/experiments.scss index 52ee60ae7..29b358cbc 100644 --- a/app/assets/stylesheets/experiments.scss +++ b/app/assets/stylesheets/experiments.scss @@ -171,6 +171,7 @@ } .workflow-img-container { + flex-shrink: 0; height: 3.5em; margin: .25em 1em .25em 0; width: 3.5em; @@ -195,6 +196,10 @@ height: 100%; margin: 0; padding: .25em 0; + + a { + overflow: hidden; + } } .start-date-cell { @@ -213,13 +218,18 @@ grid-column: 6; position: relative; - .description-text::after { - bottom: 1.5em; - right: .5em; + .description-text { + height: 4.5em; + -webkit-line-clamp: 3; + + &::after { + bottom: .5em; + right: .5em; + } } .more-button { - bottom: 1.9em; + bottom: .5em; } } diff --git a/app/views/projects/show/_experiment_card.html.erb b/app/views/projects/show/_experiment_card.html.erb index ebc229e5a..ecd4a2a1e 100644 --- a/app/views/projects/show/_experiment_card.html.erb +++ b/app/views/projects/show/_experiment_card.html.erb @@ -19,9 +19,9 @@
<% if experiment.archived_branch? %> - <%= link_to experiment.name, module_archive_experiment_path(experiment), title: experiment.name %> + <%= link_to experiment.name, module_archive_experiment_path(experiment), title: experiment.name, class: 'name-link' %> <% else %> - <%= link_to experiment.name, canvas_experiment_path(experiment), title: experiment.name %> + <%= link_to experiment.name, canvas_experiment_path(experiment), title: experiment.name, class: 'name-link' %> <% end %>
@@ -70,7 +70,7 @@
<%= custom_auto_link(experiment.description, team: current_team) %>
- <% if experiment.description.present? %> + <% if experiment.description.present? && experiment.description.length > Constants::EXPERIMENT_LONG_DESCRIPTION %> <%= link_to t('experiments.card.more'), experiment_path(experiment), class: 'more-button experiment-action-link', diff --git a/config/initializers/constants.rb b/config/initializers/constants.rb index 1e57fa005..4b61ad332 100644 --- a/config/initializers/constants.rb +++ b/config/initializers/constants.rb @@ -66,6 +66,8 @@ class Constants ATWHO_REP_NAME_LIMIT = 16 # Results limited query/display elements for pages RESULTS_PER_PAGE_LIMIT = 10 + #Experiments more button appears + EXPERIMENT_LONG_DESCRIPTION = 80 #============================================================================= # File and data memory size