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

Remove prose scope #778

Merged
merged 2 commits into from
Jun 13, 2018
Merged

Remove prose scope #778

merged 2 commits into from
Jun 13, 2018

Conversation

kr8n3r
Copy link

@kr8n3r kr8n3r commented Jun 8, 2018

We don't have confidence that the prose scope is well understood – without further research / better documentation it's safer to remove it for now.

If you are currently using prose-scope, you should revert to applying classes to individual headings, lists and hr elements.

In version 0.0.29-alpha release we have added the option to enable global link and paragraph styles. If you're using a recent version of the Private Beta Prototype kit, this is enabled by default.

Trello ticket: https://trello.com/c/v7tR99UO/955-remove-prose-scope

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-778 June 8, 2018 14:19 Inactive
CHANGELOG.md Outdated
@@ -113,6 +113,16 @@ Note: We're not following semantic versioning yet, we are going to talk about th
Note that this function will return 'web-safe' colours by default. You can
pass $websafe: false to get the non-websafe colour.

- Removal of `govuk-prose-scope`
We don't have confidence that the prose scope is well understood – without further research / better documentation it's safer to remove it for now.
Copy link
Contributor

Choose a reason for hiding this comment

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

Total nitpick - but can we please wrap at :80 consistently? The next paragraph is wrapped, but this paragraph and the final paragraph are not.

Copy link
Contributor

Choose a reason for hiding this comment

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

(Good changelog entry BTW!)

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-778 June 8, 2018 14:30 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-778 June 12, 2018 12:59 Inactive
@hannalaakso
Copy link
Member

Looks like there's still a few references to the prose scope in app/__test__/app.test.js and in files in src/core.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-778 June 13, 2018 08:58 Inactive
@kr8n3r
Copy link
Author

kr8n3r commented Jun 13, 2018

good spot. updated

@kr8n3r kr8n3r merged commit 86da116 into master Jun 13, 2018
@kr8n3r kr8n3r deleted the remove-prose-scope branch June 13, 2018 10:52
@hannalaakso hannalaakso mentioned this pull request Jun 14, 2018
@davidjamesstone
Copy link

FWIW, I thought this was a really neat feature. There are similar, generic classes in other css frameworks. I thought these were fairly well understood. e.g. bulma.

A single class to handle WYSIWYG generated content, where only HTML tags are available is a common use case .

+1 for it's return!

@36degrees
Copy link
Contributor

Thanks for the feedback @davidjamesstone – that's really useful to know. We've not ruled out adding prose scope or at least something very similar back in in the future. It's also good to see examples of how this works in other systems, like in the Bulma documentation you linked to.

kevindew added a commit to alphagov/govuk_publishing_components that referenced this pull request Apr 30, 2019
This removes the dependency this gem has on govspeak. This is in
preparation of for govspeak to have the ability to call this gem as a
means to render components within govspeak. This avoids a cyclic dependency.

This gem previously used govspeak as a means to render markdown, there
wasn't actually any specific reason this was govspeak - probably
convenience more than anything. So I've stripped this back to use the
Kramdown gem directly.

I did debate whether to use commonmarker [1] instead of kramdown, but
felt that since there's a high chance govspeak will be
installed in places of this gem they could share the same markdown
library.

For styling I created a SASS mixin that could be used for markdown
typography and included in govspeak. This allows the styles to be
shared. I feel in time these may diverge slightly to allow features
govspeak disables like more headers, but this didn't seem necessary to
implement now.

For the wrapper for markdown HTML I went for a class of
`component-markdown` on the basis that it is intended to have the
results of markdown HTML inside it. I did consider using the term
"prose" instead of "markdown", as that is govuk-frontend terminology for
HTML without classes. However govuk-frontend have since removed this [2]
so I felt using the name "markdown" would be easier to understand.

As I put this together I actually think there's value to be unlocked
from having means to render markdown in apps and govspeak be two
separate things. We have to disable govspeak security features to
allow generic app rendering [3] so a divergence of these would likely
allow both govspeak security and in app HTML flexibility to increase.
Without the baggage of govspeak options we could also just allow
passing raw markdown direct to a component rather than having an app
convert it as is done with govspeak.

I've not taken these thoughts any further here though, I'll see how this
pans out and if these are real needs.

[1]: https://github.com/gjtorikian/commonmarker
[2]: alphagov/govuk-frontend#778
[3]: https://github.com/alphagov/content-publisher/blob/654bf1a257e9a0de607e2c16b61754d55f5f8a72/app/helpers/application_helper.rb#L9
kevindew added a commit to alphagov/govuk_publishing_components that referenced this pull request Apr 30, 2019
This removes the dependency this gem has on govspeak. This is in
preparation of for govspeak to have the ability to call this gem as a
means to render components within govspeak. This avoids a cyclic dependency.

This gem previously used govspeak as a means to render markdown, there
wasn't actually any specific reason this was govspeak - probably
convenience more than anything. So I've stripped this back to use the
Kramdown gem directly.

I did debate whether to use commonmarker [1] instead of kramdown, but
felt that since there's a high chance govspeak will be
installed in places of this gem they could share the same markdown
library.

For styling I created a SASS mixin that could be used for markdown
typography and included in govspeak. This allows the styles to be
shared. I feel in time these may diverge slightly to allow features
govspeak disables like more headers, but this didn't seem necessary to
implement now.

For the wrapper for markdown HTML I went for a class of
`component-markdown` on the basis that it is intended to have the
results of markdown HTML inside it. I did consider using the term
"prose" instead of "markdown", as that is govuk-frontend terminology for
HTML without classes. However govuk-frontend have since removed this [2]
so I felt using the name "markdown" would be easier to understand.

As I put this together I actually think there's value to be unlocked
from having means to render markdown in apps and govspeak be two
separate things. We have to disable govspeak security features to
allow generic app rendering [3] so a divergence of these would likely
allow both govspeak security and in app HTML flexibility to increase.
Without the baggage of govspeak options we could also just allow
passing raw markdown direct to a component rather than having an app
convert it as is done with govspeak.

I've not taken these thoughts any further here though, I'll see how this
pans out and if these are real needs.

[1]: https://github.com/gjtorikian/commonmarker
[2]: alphagov/govuk-frontend#778
[3]: https://github.com/alphagov/content-publisher/blob/654bf1a257e9a0de607e2c16b61754d55f5f8a72/app/helpers/application_helper.rb#L9
kevindew added a commit to alphagov/govuk_publishing_components that referenced this pull request Apr 30, 2019
This removes the dependency this gem has on govspeak. This is in
preparation of for govspeak to have the ability to call this gem as a
means to render components within govspeak. This avoids a cyclic dependency.

This gem previously used govspeak as a means to render markdown, there
wasn't actually any specific reason this was govspeak - probably
convenience more than anything. So I've stripped this back to use the
Kramdown gem directly.

I did debate whether to use commonmarker [1] instead of kramdown, but
felt that since there's a high chance govspeak will be
installed in places of this gem they could share the same markdown
library.

For styling I created a SASS mixin that could be used for markdown
typography and included in govspeak. This allows the styles to be
shared. I feel in time these may diverge slightly to allow features
govspeak disables like more headers, but this didn't seem necessary to
implement now.

For the wrapper for markdown HTML I went for a class of
`component-markdown` on the basis that it is intended to have the
results of markdown HTML inside it. I did consider using the term
"prose" instead of "markdown", as that is govuk-frontend terminology for
HTML without classes. However govuk-frontend have since removed this [2]
so I felt using the name "markdown" would be easier to understand.

As I put this together I actually think there's value to be unlocked
from having means to render markdown in apps and govspeak be two
separate things. We have to disable govspeak security features to
allow generic app rendering [3] so a divergence of these would likely
allow both govspeak security and in app HTML flexibility to increase.
Without the baggage of govspeak options we could also just allow
passing raw markdown direct to a component rather than having an app
convert it as is done with govspeak.

I've not taken these thoughts any further here though, I'll see how this
pans out and if these are real needs.

[1]: https://github.com/gjtorikian/commonmarker
[2]: alphagov/govuk-frontend#778
[3]: https://github.com/alphagov/content-publisher/blob/654bf1a257e9a0de607e2c16b61754d55f5f8a72/app/helpers/application_helper.rb#L9
kevindew added a commit to alphagov/govuk_publishing_components that referenced this pull request Apr 30, 2019
This removes the dependency this gem has on govspeak. This is in
preparation of for govspeak to have the ability to call this gem as a
means to render components within govspeak. This avoids a cyclic dependency.

This gem previously used govspeak as a means to render markdown, there
wasn't actually any specific reason this was govspeak - probably
convenience more than anything. So I've stripped this back to use the
Kramdown gem directly.

I did debate whether to use commonmarker [1] instead of kramdown, but
felt that since there's a high chance govspeak will be
installed in places of this gem they could share the same markdown
library.

For styling I created a SASS mixin that could be used for markdown
typography and included in govspeak. This allows the styles to be
shared. I feel in time these may diverge slightly to allow features
govspeak disables like more headers, but this didn't seem necessary to
implement now.

For the wrapper for markdown HTML I went for a class of
`component-markdown` on the basis that it is intended to have the
results of markdown HTML inside it. I did consider using the term
"prose" instead of "markdown", as that is govuk-frontend terminology for
HTML without classes. However govuk-frontend have since removed this [2]
so I felt using the name "markdown" would be easier to understand.

As I put this together I actually think there's value to be unlocked
from having means to render markdown in apps and govspeak be two
separate things. We have to disable govspeak security features to
allow generic app rendering [3] so a divergence of these would likely
allow both govspeak security and in app HTML flexibility to increase.
Without the baggage of govspeak options we could also just allow
passing raw markdown direct to a component rather than having an app
convert it as is done with govspeak.

I've not taken these thoughts any further here though, I'll see how this
pans out and if these are real needs.

[1]: https://github.com/gjtorikian/commonmarker
[2]: alphagov/govuk-frontend#778
[3]: https://github.com/alphagov/content-publisher/blob/654bf1a257e9a0de607e2c16b61754d55f5f8a72/app/helpers/application_helper.rb#L9
kevindew added a commit to alphagov/govuk_publishing_components that referenced this pull request May 1, 2019
This removes the dependency this gem has on govspeak. This is in
preparation of for govspeak to have the ability to call this gem as a
means to render components within govspeak. This avoids a cyclic dependency.

This gem previously used govspeak as a means to render markdown, there
wasn't actually any specific reason this was govspeak - probably
convenience more than anything. So I've stripped this back to use the
Kramdown gem directly.

I did debate whether to use commonmarker [1] instead of kramdown, but
felt that since there's a high chance govspeak will be
installed in places of this gem they could share the same markdown
library.

For styling I created a SASS mixin that could be used for markdown
typography and included in govspeak. This allows the styles to be
shared. I feel in time these may diverge slightly to allow features
govspeak disables like more headers, but this didn't seem necessary to
implement now.

For the wrapper for markdown HTML I went for a class of
`component-markdown` on the basis that it is intended to have the
results of markdown HTML inside it. I did consider using the term
"prose" instead of "markdown", as that is govuk-frontend terminology for
HTML without classes. However govuk-frontend have since removed this [2]
so I felt using the name "markdown" would be easier to understand.

As I put this together I actually think there's value to be unlocked
from having means to render markdown in apps and govspeak be two
separate things. We have to disable govspeak security features to
allow generic app rendering [3] so a divergence of these would likely
allow both govspeak security and in app HTML flexibility to increase.
Without the baggage of govspeak options we could also just allow
passing raw markdown direct to a component rather than having an app
convert it as is done with govspeak.

I've not taken these thoughts any further here though, I'll see how this
pans out and if these are real needs.

[1]: https://github.com/gjtorikian/commonmarker
[2]: alphagov/govuk-frontend#778
[3]: https://github.com/alphagov/content-publisher/blob/654bf1a257e9a0de607e2c16b61754d55f5f8a72/app/helpers/application_helper.rb#L9
kevindew added a commit to alphagov/govuk_publishing_components that referenced this pull request May 1, 2019
This removes the dependency this gem has on govspeak. This is in
preparation of for govspeak to have the ability to call this gem as a
means to render components within govspeak. This avoids a cyclic dependency.

This gem previously used govspeak as a means to render markdown, there
wasn't actually any specific reason this was govspeak - probably
convenience more than anything. So I've stripped this back to use the
Kramdown gem directly.

I did debate whether to use commonmarker [1] instead of kramdown, but
felt that since there's a high chance govspeak will be
installed in places of this gem they could share the same markdown
library.

For styling I created a SASS mixin that could be used for markdown
typography and included in govspeak. This allows the styles to be
shared. I feel in time these may diverge slightly to allow features
govspeak disables like more headers, but this didn't seem necessary to
implement now.

For the wrapper for markdown HTML I went for a class of
`component-markdown` on the basis that it is intended to have the
results of markdown HTML inside it. I did consider using the term
"prose" instead of "markdown", as that is govuk-frontend terminology for
HTML without classes. However govuk-frontend have since removed this [2]
so I felt using the name "markdown" would be easier to understand.

As I put this together I actually think there's value to be unlocked
from having means to render markdown in apps and govspeak be two
separate things. We have to disable govspeak security features to
allow generic app rendering [3] so a divergence of these would likely
allow both govspeak security and in app HTML flexibility to increase.
Without the baggage of govspeak options we could also just allow
passing raw markdown direct to a component rather than having an app
convert it as is done with govspeak.

I've not taken these thoughts any further here though, I'll see how this
pans out and if these are real needs.

[1]: https://github.com/gjtorikian/commonmarker
[2]: alphagov/govuk-frontend#778
[3]: https://github.com/alphagov/content-publisher/blob/654bf1a257e9a0de607e2c16b61754d55f5f8a72/app/helpers/application_helper.rb#L9
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.

5 participants