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

fix: remove dead links #450

Merged
merged 3 commits into from
Sep 8, 2021
Merged

fix: remove dead links #450

merged 3 commits into from
Sep 8, 2021

Conversation

miles-grant-ibigroup
Copy link
Collaborator

Removes help link that doesn't contain content and makes terms of storage more info link hidden by default unless explicitly enabled in the config.

Copy link
Member

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

LGTM! Just one nit.

lib/components/user/terms-of-use-pane.js Outdated Show resolved Hide resolved
@miles-grant-ibigroup
Copy link
Collaborator Author

Thanks @landonreed ! Assigning to @binh-dam-ibigroup for final review of this small PR

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Please update example-config.yml with the new config parameter, plus a minor refactoring.

lib/components/user/terms-of-use-pane.js Outdated Show resolved Hide resolved
</Checkbox>
</FormGroup>
</div>
)
}
const mapStateToProps = (state, ownProps) => {
return {
termsOfStorageSet: state.otp.config.persistence?.terms_of_storage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment in example-config.yml to show this parameter works.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need a similar config variable for the terms of use?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Have added an example in 6227886. I don't think a similar config item for terms of use makes sense since otherwise the terms of use checkbox would not refer to any terms of use to accept!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, there is an existing component in ComponentContext in which the contents for the optional Terms of Storage is defined. Maybe you can use it in this PR to check for the existence of terms of storage instead of a new config property, or combine that in another PR. Thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I gave this some thought, having an attribute on the "dummy" components shipped within otp-rr, and then if that attribute is missing showing the link. However, I found that all our configurations ship with the dummy components anyway, so that wouldn't work unless we changed all the configurations, which I wanted to avoid.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we just check for components.TermsOfStorage !== null?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Given the rush I'm inclined to accept the approach, with issue #452 to deduplicate configuration.

@miles-grant-ibigroup
Copy link
Collaborator Author

Thanks Binh! All changes addressed

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Accepted subject to resolving #452 in some near future.

@binh-dam-ibigroup binh-dam-ibigroup merged commit bdd8951 into dev Sep 8, 2021
@binh-dam-ibigroup binh-dam-ibigroup deleted the remove-dead-links branch September 8, 2021 19:08
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2021

🎉 This PR is included in version 3.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants