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

Needs read only view #120

Open
NightJar opened this issue Jun 27, 2019 · 4 comments
Open

Needs read only view #120

NightJar opened this issue Jun 27, 2019 · 4 comments

Comments

@NightJar
Copy link
Contributor

There is currently no "read only" version of the HistoryViewerField

This means that e.g. when attempting to apply the history viewer to a versioned DataObject, one can only see history when they are editing the object.

When accessing the object from the view state of GridFieldDetailForm itemRequest, a simple read only field renders, which does not match the entwine selector to boot the react field.

@robbieaverill
Copy link
Contributor

Does something like this help?

public function performReadonlyTransformation()
{
    return clone $this; // doesn't need a different readonly state for this app
}

I'd probably argue that this is a bug

@NightJar
Copy link
Contributor Author

NightJar commented Jun 28, 2019

I'd probably argue that this is a bug

I was wondering about that, but I went with enhancement due to it currently not having a read only view, and it would after the issue is closed.

Happy to have it reclassified

@robbieaverill
Copy link
Contributor

Right, I guess I'm thinking of it more as "it doesn't work in a readonly context" e.g. when viewing a record rather than editing it.

@NightJar
Copy link
Contributor Author

Yeah, it's a fine line. It doesn't work in that one does not see the history viewer as expected, however it does work in that it does not cease operation. One simply sees a generic ReadOnlyField with no content.

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

No branches or pull requests

3 participants