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

Make tree master detail dialog styleable by adding css classes #627

Conversation

lucas-koehler
Copy link
Contributor

  • Added style classes to dialog and its child elements
  • Adapted tree renderer test cases to changes

* Added style classes to dialog and its child elements
* Adapted tree renderer test cases to changes
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 95.221% when pulling 1fb4c41 on lucas-koehler:jsonforms2_treerenderer_dialog_style into c5e74bb on eclipsesource:jsonforms2.

this.dialog.appendChild(dialogContent);
const dialogClose = document.createElement('button');
dialogClose.innerText = 'Close';
dialogClose.onclick = () => this.dialog.close();
dialogClose.classList.add('btn');
Copy link
Contributor

Choose a reason for hiding this comment

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

Why btn? Shouldn't this be button?

Copy link
Contributor Author

@lucas-koehler lucas-koehler Aug 13, 2017

Choose a reason for hiding this comment

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

This makes it compatible to materialize. However, that should be too specific for the general tree renderer. Should I leave it, change it to button or remove it completely? I think having a general button class makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, it's fine. It's just that we have to aggre on a style naming convention. I'd go with button in this case as and our tests already make use this.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 95.252% when pulling d16f15e on lucas-koehler:jsonforms2_treerenderer_dialog_style into 5b2e98d on eclipsesource:jsonforms2.

* Changed universal CSS class from 'btn' to 'button' for the tree master
detail's dialog's buttons
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 95.252% when pulling 5f43e6a on lucas-koehler:jsonforms2_treerenderer_dialog_style into 5b2e98d on eclipsesource:jsonforms2.

Copy link
Contributor

@edgarmueller edgarmueller left a comment

Choose a reason for hiding this comment

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

See comment about missing use of styling registry

this.dialog.appendChild(dialogContent);
const dialogClose = document.createElement('button');
dialogClose.innerText = 'Close';
dialogClose.onclick = () => this.dialog.close();
dialogClose.classList.add('button');
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I've missed that the styling registry isn't utilized here. Use JsonForms.stylingRegistry.addStyle to apply the actual styles for the relevant HTML elements.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 95.252% when pulling aa1fced on lucas-koehler:jsonforms2_treerenderer_dialog_style into 5b2e98d on eclipsesource:jsonforms2.

@edgarmueller
Copy link
Contributor

Thank you!

@edgarmueller edgarmueller merged commit cc78dec into eclipsesource:jsonforms2 Aug 16, 2017
@lucas-koehler lucas-koehler deleted the jsonforms2_treerenderer_dialog_style branch September 22, 2017 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants