formadmin icon indicating copy to clipboard operation
formadmin copied to clipboard

Improvement in responsible tables

Open lsarni opened this issue 7 years ago • 2 comments

I feel like the current behaviour of the tables on mobile isn't ideal.

Normal: image

Mobile image

This makes it really hard to read, especially if the column values aren't as obvious as this example.

I feel something like this will make a lot more sense (taken form here): image

Or just showing the column name next to the value could be enough.

lsarni avatar Oct 13 '17 19:10 lsarni

Hi, @lsarni.

Do you have an idea how to do this without JavaScript?

If JavaScript is the only way, we can work on a separate library for this purpose.

caiotarifa avatar Oct 24 '17 11:10 caiotarifa

There is this codepen, I built a workaround for my case based on that but it's too hacky.

column do
  "<span class='column-title'>#{day}:</span><span class='common'> #{order.meal.menu.name}</span>".html_safe
end
#attributes_table_arbre_html_menu {
  .column-title {
    display: none !important;
  }
}

@media only screen and (max-width: 767px) {
  #attributes_table_arbre_html_menu {
    .column-title {
      display: inline !important;
      text-decoration: underline;
    }
  }
}

Web: image

Mobile: image

lsarni avatar Oct 24 '17 16:10 lsarni