Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Icon config #529

Closed
wants to merge 5 commits into from
Closed

Icon config #529

wants to merge 5 commits into from

Conversation

rofe
Copy link
Contributor

@rofe rofe commented Nov 12, 2019

Proposal to enable #523 without breaking backward compatibility.

@rofe rofe requested a review from trieloff November 12, 2019 12:45
@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

Merging #529 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #529   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          51     51           
  Lines        1139   1139           
=====================================
  Hits         1139   1139
Impacted Files Coverage Δ
src/utils/icon-handler.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63f615e...b9c7b5a. Read the comment docs.

Copy link
Contributor

@trieloff trieloff left a comment

Choose a reason for hiding this comment

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

The code looks good, but do we really need the config?

src/schemas/secrets.schema.json Outdated Show resolved Hide resolved
@rofe rofe marked this pull request as ready for review November 12, 2019 16:16
@rofe rofe requested a review from tripodsan November 13, 2019 09:31
@rofe
Copy link
Contributor Author

rofe commented Nov 13, 2019

The code looks good, but do we really need the config?

If we want to enable #523 without disabling single SVG icon files at the same time, I thought a config would be the least intrusive/breaking way to have both. But I'm open for alternative solutions.

@trieloff
Copy link
Contributor

Ok

Copy link
Contributor

@tripodsan tripodsan left a comment

Choose a reason for hiding this comment

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

is this really needed?

  • even with the config, you can only change so much. but not the tag name (e.g. if you wanted img icons)
  • a helix-pages user would not be able to change this
  • I think that using action params for controlling the output is suboptimal and not scalable.

As for the configurability, we should find a way for the developper to extend the makehtml step.
maybe with pipe.configure('html').getHandler('icon').options(....). I sure we find a better way :-)

As for helix-pages, I think this should be solvable via the markup.yaml. see #516

maybe:

markup:
  icons:
    match: svg.icon
    replace: '<img src="/designs/pics/${e.data-value}.png">'

@tripodsan tripodsan requested a review from trieloff November 14, 2019 14:42
@rofe
Copy link
Contributor Author

rofe commented Nov 15, 2019

I agree that we'll need a solution that works for helix-pages. Closing this PR.

@rofe rofe closed this Nov 15, 2019
@rofe rofe deleted the icon-config branch November 28, 2019 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants