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

Fix: Remove unwanted CSS styling from jsonform init #94

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

srijitcoder
Copy link
Member

@srijitcoder srijitcoder commented Feb 12, 2025

Implementation

@srijitcoder srijitcoder added the bug Something isn't working label Feb 12, 2025
@srijitcoder srijitcoder marked this pull request as ready for review February 12, 2025 16:02
Copy link
Collaborator

@silvester-pari silvester-pari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some testing and am wondering if we can't just delete everything from line 35 onwards? What is the use for the expandButtons etc.?

In case of no schema map found, we can do

// schema.js
export function getFileSchema() {
  return {
    generic: true,
    schema: {
      title: "git-clerk",
      type: "object",
      properties: {
        file: {
          title: "File contents",
          type: "string",
          format: "textarea",
          options: {
            resolver: "ace"
          }
        },
      },
    },
  };
}

in order to show a default editor and a nice title instead of "file"; or we can use options.titleHidden: true in order to hide the label/title. Probably no need for CSS hacks?

@silvester-pari
Copy link
Collaborator

I did some testing and am wondering if we can't just delete everything from line 35 onwards? What is the use for the expandButtons etc.?

In case of no schema map found, we can do

// schema.js
export function getFileSchema() {
  return {
    generic: true,
    schema: {
      title: "git-clerk",
      type: "object",
      properties: {
        file: {
          title: "File contents",
          type: "string",
          format: "textarea",
          options: {
            resolver: "ace"
          }
        },
      },
    },
  };
}

in order to show a default editor and a nice title instead of "file"; or we can use options.titleHidden: true in order to hide the label/title. Probably no need for CSS hacks?

We could even pass the file ending of the current file to export function getFileSchema(fileEnding = "txt") {

      properties: {
        file: {
          title: "File contents",
          type: "string",
          format: fileEnding,

in order to let ace editor do some automatic syntax highlighting :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants