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

OSCAL Model Maps - further enhancements #36

Open
3 tasks
wendellpiez opened this issue Dec 7, 2020 · 4 comments
Open
3 tasks

OSCAL Model Maps - further enhancements #36

wendellpiez opened this issue Dec 7, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@wendellpiez
Copy link
Collaborator

wendellpiez commented Dec 7, 2020

User Story:

Further work is possible improving the XML and JSON model maps as produced for documentation for example in OSCAL documentation.

In particular, we agreed in a Lunch w/ Devs (Dec 3 2020) when looking at mockups, that we would like to produce the map entries with item cardinalities listed to the left of each item, in a tabular arrangement (within the expanding tree), something like as shown in this screenshot:

image

However, it proves difficult to implement this layout to work consistently across browsers as of this date.

Goals:

Implement a clean, portable map design showing a cleaner "gridded" arrangement with nesting than the current model maps. Show item cardinality on the left as in the screenshot above.

Whitespace and indenting integrity must be maintained as the view is arbitrarily expanded and collapsed. In particular, line wrap must be clean when lines grow too long to fit.

Dependencies:

If browser support for list-style-position on summary is supported across browsers, then summaries can be listed with correct vertical alignment. (See https://www.caniuse.com/?search=summary%20list-item) This is tricky especially since HTML display/summary may be wanted on some items, while other neighboring items are not made to expand.

We also need to make sure that the expansion icon shows even if the summary contains flex boxes (as of now in FF, it does not, while in Chrome, it does), potentially with CSS to that effect.

Tips:

This commit represents a best effort WIP before factoring this work back out: wendellpiez/metaschema@57acadd

  • CSS flex boxes summary { display: flex } may help

Acceptance Criteria

  • All website and readme documentation affected by the changes in this issue have been updated. Changes to the website can be made in the docs/content directory of your branch.
  • A Pull Request (PR) is submitted that fully addresses the goals of this User Story. This issue is referenced in the PR.
  • The CI-CD build process runs without any reported errors on the PR. This can be confirmed by reviewing that all checks have passed in the PR.

{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}

@wendellpiez wendellpiez added the enhancement New feature or request label Dec 7, 2020
wendellpiez referenced this issue in wendellpiez/metaschema Dec 7, 2020
…ss-browser testing see usnistgov/metaschema#91
@wendellpiez
Copy link
Collaborator Author

Summary version: For what we need to control line items in the tree, fixing widths and flowing where we need, CSS flex (flex boxes) work well. But they do not currently play well with details/summary in some browsers (e.g. in Chrome, which moves markers out of position when summary is not just inline). Where it works (Firefox), the code is clean.

We could get around this by going back to a JS collapse/expansion implementation. Alternatively, Chrome may be updated or there may be a CSS-based solution for Chrome.

@wendellpiez
Copy link
Collaborator Author

Now done in PR usnistgov/metaschema#127.

wendellpiez referenced this issue in wendellpiez/metaschema Mar 29, 2021
@wendellpiez
Copy link
Collaborator Author

This is however not done on the XML side, only on the JSON side.

LOE to do it on the XML side is not high. However, it might look better as is (with cardinality at the end of the line).

image

? Comments welcome

@wendellpiez
Copy link
Collaborator Author

Current JSON map (with cardinality to the left):

image

wendellpiez referenced this issue in wendellpiez/metaschema Mar 30, 2021
david-waltermire referenced this issue in usnistgov/metaschema Mar 30, 2021
@david-waltermire david-waltermire removed the documentation Improvements or additions to documentation label Feb 14, 2023
@david-waltermire david-waltermire transferred this issue from usnistgov/metaschema Jun 30, 2023
nikitawootten-nist pushed a commit to nikitawootten-nist/metaschema-xslt that referenced this issue Jul 21, 2023
…snistgov#36)

* Work in progress on metaschema-related updates towards OSCAL SSP conversion roundtrips.
* added required top-level property to all unit-test JSON schema files
* Added XSD targets for unit testing
* oXygen project file for metaschema testing
* Updated project file
* Test coverage and planning docs
* added unit test for collapse
* fixed a bug in the test script causing expected schema files to not be compared.
* Addressing Issue usnistgov#11: JSON Schema missing constraint at root
* Adding metaschema documentation. usnistgov#16 usnistgov/OSCAL#596
* Added CI/CD files for website.
Added Github issue templates.
* Addressing usnistgov#12, supporting collapsibility of fields.
* Fixed website build error.
* Updating website contents and CI/CD configuration.
* Patch to catch up metaschema implementation to latest changes in the OSCAL repo.
* fixed broken links in documentation
* updated repository documentation to fix broken links
* added configuration support to build scripts
* Implemented content converter generation in build scripts
* Removed references to local files for usnistgov/OSCAL#566
* integrated schema generation unit tests with new build scripting
* Now accounting for json-value-key/json-key combination

Co-authored-by: David Waltermire <david.waltermire@nist.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants