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

Structure field: preview for toggle field missing #2126

Closed
afbora opened this issue Sep 18, 2019 · 7 comments

Comments

@afbora
Copy link
Contributor

@afbora afbora commented Sep 18, 2019

Describe the bug

The toggle field does not appear to be significant in the structure field.

fields:
  toggles:
    label: Toggle Preview
    type: structure
    fields:
      toggle1:
        type: toggle
        default: false
        label: Toggle Off
      toggle2:
        type: toggle
        default: true
        label: Toggle On
      toggle3:
        label: Toggle Nope/Yay
        type: toggle
        text:
            - Nope
            - Yay

To Reproduce
Steps to reproduce the behavior:

  1. Go to panel
  2. Add above structure fields to blueprint
  3. Add content to structure and save
  4. See messages as true or -

Expected behavior
It should be more meaningful like On/Off or custom text as Nope/Yay.

Screenshots
FireShot Capture 762 - Chasing waterfalls - Mægazine_ - http___localhost_test_kirby_3 2 5_

Kirby Version
3.2.5-RC.2

Desktop

  • Windows 10
  • Chrome 77
@distantnative distantnative changed the title [Panel] Toggle preview enhancement on structure field Structure field: preview for toggle field missing Sep 18, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Sep 19, 2019

I think we should use @sylvainjule's amazing toggle preview if he's not against it: https://github.com/sylvainjule/kirby-previews

@distantnative

This comment has been minimized.

Copy link
Contributor

@distantnative distantnative commented Sep 19, 2019

I would still like if we could include custom text for on/off if it has been defined.

@afbora

This comment has been minimized.

Copy link
Contributor Author

@afbora afbora commented Sep 19, 2019

I would also like to see custom text if it is defined.

@GiantCrocodile

This comment has been minimized.

Copy link

@GiantCrocodile GiantCrocodile commented Sep 23, 2019

Maybe it would be even nice to be able to define the icon for the om/off preview: a tick, question mark, www, whatever. The meaning depends on what your toggle says so choosing the icon can be helpful.

bastianallgeier added a commit that referenced this issue Sep 27, 2019
bastianallgeier added a commit that referenced this issue Sep 27, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Sep 27, 2019

@GiantCrocodile

This comment has been minimized.

Copy link

@GiantCrocodile GiantCrocodile commented Sep 28, 2019

A custom icon isn't supported, right @bastianallgeier?

@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Sep 28, 2019

@GiantCrocodile no, that could be an extra feature. But in this case I'd prefer to also add that feature to the toggle input field. Feel free to add a new idea ticket for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.