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

added LinkType.Top enum, so we can specify only top level links #202

Merged

Conversation

sergey-litvinov-work
Copy link
Contributor

Hi Jouke,

It's a PR for #201 item. I tried to preserve back compatibility and all existing tests are passing fine. I also added new one to test Top only scenario.

Thanks

if (_resource.LinkType.HasFlag(LinkType.Self))
// if resource has Top only and not Self, then we render it.
// otherwise to preserve back compatibility if Self is enabled, then we also render it
if ((_resource.LinkType.HasFlag(LinkType.Top) && !_resource.LinkType.HasFlag(LinkType.Self))
Copy link
Owner

Choose a reason for hiding this comment

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

I think this can be simplified to Top || Self?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Updated it

/// <summary>
/// Only top section links
/// </summary>
Top = 4,
Copy link
Owner

Choose a reason for hiding this comment

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

Like I said on the issue, should this contain the word Self since it only applies to that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated it. Now it's TopSelf

Copy link
Owner

@joukevandermaas joukevandermaas left a comment

Choose a reason for hiding this comment

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

Great!

@joukevandermaas joukevandermaas merged commit c301136 into joukevandermaas:master Sep 26, 2018
@sergey-litvinov-work
Copy link
Contributor Author

Thanks!

@sergey-litvinov-work sergey-litvinov-work deleted the top-linktype branch February 27, 2020 12:13
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.

2 participants