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

Use textareas for JSON columns #16139

Closed
Flynamic opened this issue May 25, 2020 · 2 comments · Fixed by #16236
Closed

Use textareas for JSON columns #16139

Flynamic opened this issue May 25, 2020 · 2 comments · Fixed by #16236
Assignees
Labels
enhancement A feature request for improving phpMyAdmin good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete ui Issues relating to the user interface
Milestone

Comments

@Flynamic
Copy link

Flynamic commented May 25, 2020

Is your feature request related to a problem? Please describe.

The json field is currently a small, simple input field. It is very frustrating to work with when I want to inspect or edit json values that are longer than 60 characters. Textareas, like they are used for longtext, would be the more practical choice for this data type. Especially considering that the MySQL storage requirements explicitly state that they use roughly the same amount of storage:

In general, the storage requirement for a JSON column is approximately the same as for a LONGBLOB or LONGTEXT column; that is, the space consumed by a JSON document is roughly the same as it would be for the document's string representation stored in a column of one of these types.

Describe the solution you'd like

Make fields of type json resizable <textarea>s.

Describe alternatives you've considered

Increasing the number of columns and rows for input fields in the settings panel. However, this change applies for char and varchar as well and not just json, and it still does not make the input resizable.

Additional context

  • phpMyAdmin version: 5.0.1

image

@williamdes williamdes added enhancement A feature request for improving phpMyAdmin good first issue ui Issues relating to the user interface labels May 25, 2020
@williamdes
Copy link
Member

Having code-mirror in the text area could be cool for some highlighting 👍

@williamdes williamdes added this to Triage zone in Enhancements via automation May 25, 2020
@williamdes williamdes moved this from Triage zone to Nice to have soon in Enhancements May 25, 2020
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Jun 27, 2020
@williamdes
Copy link
Member

CREATE TABLE `textarea_cases` (
    `id` INT NOT NULL ,
    `json` JSON NOT NULL ,
    `longtext` LONGTEXT NOT NULL ,
    `text` TEXT NOT NULL ,
    `varchar` VARCHAR(2000) NOT NULL
) ENGINE = InnoDB;

@williamdes williamdes self-assigned this Jul 2, 2020
@williamdes williamdes added this to the 5.1.0 milestone Jul 2, 2020
williamdes added a commit that referenced this issue Jul 2, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
Enhancements automation moved this from Nice to have soon to Done Jul 2, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement A feature request for improving phpMyAdmin good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete ui Issues relating to the user interface
Projects
Enhancements
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants