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

Map widget if part of an object that is initially collapsed does not show when expanded #6541

Closed
m3dwards opened this issue Aug 22, 2022 · 0 comments · Fixed by #7229
Closed
Labels
area: extensions/widgets good first issue type: bug code to address defects in shipped code

Comments

@m3dwards
Copy link

m3dwards commented Aug 22, 2022

Describe the bug
If the map widget is part of an object that is initially collapsed, when you expand the section the map does not show. Weirdly for me if I open dev tool the map immediately shows. I don't understand what opening dev tools does.

Screenshots
image

Applicable Versions:
netlify-cms-app 2.15.72
netlify-cms-core 2.55.2
netlify-cms 2.10.192

Replicated in Chrome, Safari and Firefox on M1 Mac Pro
Chrome Version 104.0.5112.101 (Official Build) (arm64)
Safari Version 15.6 (17613.3.9.1.5)
Firefox Version 103.0.2

CMS configuration

backend:
  name: git-gateway
  # name: test-repo
  branch: main # Branch to update (optional; defaults to master)
media_folder: public/img
public_folder: img
collections:
  - name: "pages"
    label: "Pages"
    files:
      - label: "Home"
        name: "home"
        file: "content/index.md"
        fields:
          - { label: "Title", name: "title", widget: "string" }
          - { label: "Publish Date", name: "date", widget: "datetime" }
          - { label: "Top Body", name: "topbody", widget: "markdown" }
          - { label: "Body", name: "body", widget: "markdown" }
      - label: "News"
        name: "news"
        file: "content/news.md"
        fields:
          - { label: "Title", name: "title", widget: "string" }
          - { label: "Publish Date", name: "date", widget: "datetime" }
          - { label: "Body", name: "body", widget: "markdown" }
  - label: "Sites"
    name: "sites"
    folder: "content/sites"
    create: true
    identifier_field: name
    fields:
      - { label: "Name", name: "name", widget: "string" }
      - {
          label: "Status",
          name: "status",
          widget: "select",
          options: ["Open to all", "Open to club members", "Closed"],
          default: "Open to all",
        }
      - {
          label: "Sensitive",
          name: "sensitive",
          widget: "select",
          options: ["Sensitive", "Not Sensitive"],
          default: ["Not Sensitive"],
        }
      - { label: "HG Rating", name: "hgrating", widget: "string" }
      - { label: "PG Rating", name: "pgrating", widget: "string" }
      - label: "Takes Wind Direction"
        name: "windDirection"
        widget: "list"
        summary: "{{fields.from}} - {{fields.to}}"
        fields:
          - {
              label: "From",
              name: "from",
              widget: "select",
              options:
                ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"],
            }
          - {
              label: "To",
              name: "to",
              widget: "select",
              options:
                ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"],
            }
      - label: "Location"
        name: "location"
        widget: "object"
        collapsed: true
        fields:
          - { label: "Grid Ref", name: "gridref", widget: "string" }
          - { label: "LatLong", name: "latlong", widget: "map" }
          - { label: "Maps", name: "maps", widget: "string" }
      - { label: "Sensitivities", name: "sensitivities", widget: "text" }
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Featured Image", name: "thumbnail", widget: "image", required: false }
      - { label: "Body", name: "body", widget: "markdown" }
  - label: "News"
    name: "news"
    folder: "content/news"
    create: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Featured Image", name: "thumbnail", widget: "image", required: false }
      - { label: "Body", name: "body", widget: "markdown" }
  - label: "Safety"
    name: "safety"
    folder: "content/safety"
    create: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Featured Image", name: "thumbnail", widget: "image", required: false }
      - { label: "Body", name: "body", widget: "markdown" }
@m3dwards m3dwards added the type: bug code to address defects in shipped code label Aug 22, 2022
afieif added a commit to afieif/decap-cms that referenced this issue Jun 12, 2024
martinjagodic added a commit that referenced this issue Jun 26, 2024
…y collapsed sections (#6541) (#7229)

* fix(map-widget): ensure map renders correctly when expanding initially collapsed sections (#6541)

* fix: newlline lint

---------

Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: extensions/widgets good first issue type: bug code to address defects in shipped code
Projects
None yet
2 participants