apache / apache/grails-core

Documentation should have at least one example, or show what is currently being used.

Open
#14,224 1 comment 0 reactions 0 assignees View on GitHub
relates-to: grails-fields
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

As BigDecimal with scale of more than 3 is truncated with , etc, as a workaround, we need to override the default display. I have been told that we should create this file:

views/_fields/bigDecimal/_displayWidget.gsp

The question is, what should go in this file? The documentation should have at least one example, or point to where the current contents of this file (which don't seem to exist).

I could do something like ${value}.toPlainString(), but what html formatting needs to go round it to make it look/work like the other values? E.g. does it need div or span? does it need any specific class defined? One example in the docs, or copies of the existing implementations (or link to them) would really help.

Contributor guide

Open the contributing guide

Research direction

Start by locating the BigDecimal display documentation and existing field widget implementations, then compare them with the proposed views/_fields/bigDecimal/_displayWidget.gsp path. Document one working example or link to the current implementation, including the expected HTML formatting and CSS class usage. Done means a newcomer can determine what belongs in the override.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.