Skip to content

Collection label disappears when value is too long #7532

@jenlampton

Description

@jenlampton

Describe the bug
I have a collection named "config" that contains URLs in each field. These are all defined as (string) value.
When these URLs reach a certian length (50 characters) the label disappears from the "Preview" panel on the right.

To Reproduce
Steps to reproduce the behavior. For example:

  1. Go to an admin interface
  2. Provide a URL as a value for a string field that is more than 50 characters
  3. look at the preview pane to the right
  4. Note that the labels are missing

Expected behavior
Labels should be visible

Screenshots

Preview with long URLs
Image

Same page, only shortened the values:
Image

Applicable Versions:

  • Decap CMS version: [e.g. 2.0.4]
  • Git provider: github
  • OS: Mac OS, Linux
  • Browser version: all
  • Node.JS version: 18

CMS configuration

config.ts
import { CollectionMenus } from './collections/CollectionMenus';
import { CollectionCategory } from './collections/CollectionCategory';
import { CollectionIndicator } from './collections/CollectionIndicator';
import { CollectionMorePages } from './collections/CollectionMorePages';
import { CollectionCharts } from './collections/CollectionCharts';
import { CollectionMaps } from './collections/CollectionMaps';
import { CollectionTargets } from './collections/CollectionTargets';
import { CollectionConfig } from './collections/CollectionConfig';

export const getConfig = () => {
const config = {
editor: {
preview: true,
},
cms_manual_init: true,
backend: {
name: 'git-gateway', // git-gateway | test-repo
branch: process.env.NEXT_PUBLIC_CMS_BRANCH,
squash_merges: true,
},
load_config_file: false,
media_folder: 'public/uploads/',
public_folder: '/uploads',
collections: [
CollectionMenus,
CollectionCategory,
CollectionIndicator,
CollectionMorePages,
CollectionCharts,
CollectionTargets,
CollectionMaps,
CollectionConfig,
],
};

const isLocalBackend = process.env.NEXT_PUBLIC_LOCAL_BACKEND === 'TRUE';

if (isLocalBackend) {
// See https://decapcms.org/docs/working-with-a-local-git-repository/#configure-the-decap-cms-proxy-server-port-number
Object.assign(config, {
local_backend: {
url: 'http://localhost:8081/api/v1',
allowed_hosts: ['192.168.0.1'],
},
});
}

return config;
};

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions