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

add form predicate to make a form field read-only #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

x-m-el
Copy link
Collaborator

@x-m-el x-m-el commented Dec 4, 2024

add the usage of the predicate form:displayshow (a boolean) to a form field to specify if @show should be true or not (which is used to if it is read-only or not). Before, only a whole form could be set as read-only. Now this can be done per field.

I couldn't find a way to support it without changing the templates, as the logic for @show is mainly in there.

@cecemel cecemel requested a review from Windvis December 5, 2024 12:30
@Windvis
Copy link
Contributor

Windvis commented Dec 5, 2024

Not sure what's up with CI. It seems to complain about this line: https://github.com/frogcat/ttl2jsonld/blob/686ae54dd13c5769750a0dd879c5551c8e1ca7ad/ttl2jsonld.js#L4617

But don't understand why that line is being executed during the build and why it only starts error'ing now 🤔

Edit: it seems to be related to the removal of ember-data-table from Appuniversum v3.7.0. ember-data-table still depends on ember-auto-import v1, which brings in Webpack v4. Once Webpack v4 is no longer in the dependency tree we see the Webpack 5 error about url not being available 🤔 but only under Embroider.

Copy link
Contributor

@Windvis Windvis left a comment

Choose a reason for hiding this comment

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

Looks good, only a small nitpick 👍

@tracked
rdflibDisplayShow = null;
get displayShow() {
return (this.rdflibDisplayShow && this.rdflibDisplayShow.value) === '1';
Copy link
Contributor

@Windvis Windvis Dec 5, 2024

Choose a reason for hiding this comment

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

I would use Literal.toJs (we use this in some places already) so you don't have to do this === '1' check.

sh:order 223 ;
sh:path ext:inputValue ;
form:displayType displayTypes:defaultInput ;
form:displayShow true ;
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the predicate name of this discussed with Felix? Just double checking since it's pretty final after we merge this 😄.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, see this is a draft "POC" PR ;)
As I indeed miss the needed context and history to make a correct decision on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants