Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Introduce a new class Reline::Face to configure character attributes #552
Introduce a new class Reline::Face to configure character attributes #552
Changes from 3 commits
1224863
17114b9
e033f88
629db24
a993e52
cab307f
e4d61dd
0e7acfb
b442c57
389ff41
c3f92f1
d652fc0
1550519
6e4b4e9
e8eb85b
7ea200e
26cb115
9286c59
f001348
28197be
efb75ed
e7a6d56
5a53084
67a8497
c02205c
728ca2d
cde902e
23d2360
2eee3b0
76dd7b0
1ce4818
7c5133c
a33109f
544f3d1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too sure about the singleton method approach. For example, it means we don't have a way to list all configured variations. I think it'll be easier to debug and maintain if we can use a hash here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't misunderstand what you say, we do.
@configs
would be the hash that you say:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But individual configs have different states/types (e.g.
enhanced
), how can we know what's defined and what are the values?For example,
I'd like to see something like this when I call
face.inspect
:There should also be something like
face.states
to list all registered states.And to achieve this, the code would look like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API usage is like this
I think it's good. I especialy like that YAML format will be simple.
However, I thought if I can define it like this
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO using a constant to host mutable data is a bit anti-pattern. Do you think we can use singleton instance variable instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what you mean?
1550519