https://avo.cool logo
Join Discord
Powered by
# avo-2
  • l

    lemon-wall-20836

    04/01/2022, 7:21 AM
    probably the easiest solution here is to add
    data: { turbo: false }
    to your forms
    Copy code
    ruby
    <%= form_with url: some_path, data: { turbo: false } do |f| %>
       ...
    <% end %>
  • l

    lemon-wall-20836

    04/01/2022, 7:25 AM
    this is the "dependent fields" feature and it's not available yet
  • l

    lemon-wall-20836

    04/01/2022, 7:25 AM
    we want to bring that on pretty soon. we know how powerful it is
  • l

    lemon-wall-20836

    04/01/2022, 7:29 AM
    one thing you could do is let's say you have a post with a title a type (dropdown with
    simple
    and
    advanced
    options) and another two fields
    simple_reason
    and
    advanced_reason
    that you'd like to toggle based on the select field
  • l

    lemon-wall-20836

    04/01/2022, 7:31 AM
    on the
    New
    screen show only the title and the select field, and on the edit, show the
    simple_reason
    or
    advanced_reason
    based on the model value
  • b

    brief-king-35906

    04/01/2022, 9:55 AM
    in the dashboards docs, under visibility, there's a reference to
    params
    - https://docs.avohq.io/2.0/dashboards.html#dashboards-visibility what would these params be? i have users which are moderators for one or more 'systems'. i'd love to present a dashboard for performance of a system but right now it looks like i need to make duplicate dashboards and duplicate cards for each system. could those params help with this?
  • l

    lemon-wall-20836

    04/01/2022, 10:15 AM
    Hey John, great question!
  • l

    lemon-wall-20836

    04/01/2022, 10:16 AM
    To settle the first question, the
    params
    are the regular request params you get in the controller when the dashboard is rendered
  • l

    lemon-wall-20836

    04/01/2022, 10:18 AM
    regarding the second issue of duplicating cards, we fell into that trap too. Let's say you have a metric card that displays the count of Posts. If you want to show the count of featured posts then you'd need to create a different card, and so on
  • l

    lemon-wall-20836

    04/01/2022, 10:19 AM
    we're going to improve that in the near future (two-three weeks) by allowing you to pass special options to the cards in the dashboard.
  • l

    lemon-wall-20836

    04/01/2022, 10:21 AM
    essentially doing something like this in a dashboard file
  • l

    lemon-wall-20836

    04/01/2022, 10:22 AM
    ofc, the API isn't settled yet. I'd like to be able to pass blocks as well. this is just pseudo-code right now👆
  • l

    lemon-wall-20836

    04/01/2022, 10:22 AM
    does this answer your question?
  • b

    brief-king-35906

    04/01/2022, 10:23 AM
    yes yes yes - that would be awesome! i assumed this was just something that would be improved over time
  • b

    brief-king-35906

    04/01/2022, 10:24 AM
    the other part was around using the same dashboard for multiple different scopes
  • b

    brief-king-35906

    04/01/2022, 10:24 AM
    whether that is having multiple actual dashboards, or having a select field as part of a dashboard to choose which scope to use
  • l

    lemon-wall-20836

    04/01/2022, 10:24 AM
    yeah. we will improve that, but for now you shoud create a card for each metric 😬
  • l

    lemon-wall-20836

    04/01/2022, 10:25 AM
    same dashboard for multiple different scopes, we haven't thought about that
  • b

    brief-king-35906

    04/01/2022, 10:26 AM
    so like a
    DiscordChannelDashboard
    and i could select one of multiple channels to show me current active users etc
  • l

    lemon-wall-20836

    04/01/2022, 10:26 AM
    hmm... that's not a bad idea actually
  • l

    lemon-wall-20836

    04/01/2022, 10:26 AM
    makes sense
  • l

    lemon-wall-20836

    04/01/2022, 10:26 AM
    you could hack it for now actually
  • l

    lemon-wall-20836

    04/01/2022, 10:27 AM
    create one dashboard. add one card with a opartial and a dropdown that redirects to the same dashbaord URL with some param attached
    ?channel="help
    . then, pick up that param in the dashboard and show different things?
  • b

    brief-king-35906

    04/01/2022, 10:28 AM
    oh cool - that's a smart approach. do cards have access to the params as well?
  • l

    lemon-wall-20836

    04/01/2022, 10:28 AM
    ... until we create a proper solution 🙂
  • l

    lemon-wall-20836

    04/01/2022, 10:28 AM
    you should get
    params
    . lemme check
  • l

    lemon-wall-20836

    04/01/2022, 10:30 AM
    you do get the params but they are actually the card params, not the dashboard params
  • l

    lemon-wall-20836

    04/01/2022, 10:30 AM
    cards being hotwire frames, so they are different
  • l

    lemon-wall-20836

    04/01/2022, 10:30 AM
    I'll have to push an update for that
  • b

    brief-king-35906

    04/01/2022, 10:34 AM
    no worries, i probably wont get on to this for a couple of weeks. just gotta change the way my analytics stuff works at some point and dashboards would be a great option
1...323334...64Latest