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

Add readonly ApplicationConfig to /internal/config #5662

Merged
merged 3 commits into from
Feb 4, 2020

Conversation

citizen428
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Feature

Description

This adds the values from ApplicationConfig to /internal/configs.

Note: there are quite a few values, 73 in total. So I opted for a slightly less sophisticated approach, basically just using some Ruby methods to iterate over the ENVied config. Since these values are read-only, I thought we could get away with this, since you'd have to edit Envfile in order to change them, which includes more comments. This was done both to save space on the page, as well as save time in developing this.

Related Tickets & Documents

#5384

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Since the page got quite long, I made sections that can be toggled:

Screen Shot 2020-01-23 at 14 31 09

The ApplicationConfig section looks like this:

Screen Shot 2020-01-23 at 14 31 36

Added to documentation?

  • docs.dev.to
  • readme
  • no documentation needed

Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

Hi @citizen428, great job!

A couple of UI tweaks I think we should apply:

  • the sections should be opened by default, great idea to add toggles by the way!

  • there should be empty space between the first section and the second:

Screenshot_2020-01-23 Configs

this way the button kinda disappears in the flow

app/views/internal/configs/show.html.erb Outdated Show resolved Hide resolved
@citizen428 citizen428 self-assigned this Jan 27, 2020
@citizen428
Copy link
Contributor Author

@rhymes Thanks for helping the aesthetically challenged 😉 The sections are now expanded by default and I added some spacing between them.

Screen Shot 2020-01-27 at 14 43 46

Screen Shot 2020-01-27 at 14 44 02

Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

Looks good. don't forget to remove WIP unless you're still working on it

@citizen428 citizen428 changed the title [WIP] Add readonly ApplicationConfig to /internal/config Add readonly ApplicationConfig to /internal/config Jan 27, 2020
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 27, 2020
jacobherrington
jacobherrington previously approved these changes Feb 2, 2020
Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

This makes sense to me. 👍

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Feb 2, 2020
rhymes
rhymes previously approved these changes Feb 3, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@Zhao-Andy Zhao-Andy left a comment

Choose a reason for hiding this comment

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

Just a typo :) Looks great otherwise!

</div>
<% end %>
</div>
<//div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Think this should be </div> Although it renders fine anyway 🙃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking again this whole div seems to have snuck in, probably some autocomplete mess up.

BTW, I won't get offended if you fix typos etc. on "my" branches yourself, especially if it means we can get things merged.

@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Feb 3, 2020
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes labels Feb 4, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

LGTM!

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Feb 4, 2020
@rhymes rhymes requested a review from Zhao-Andy February 4, 2020 13:37
Copy link
Contributor

@Zhao-Andy Zhao-Andy left a comment

Choose a reason for hiding this comment

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

Nice!

@Zhao-Andy Zhao-Andy merged commit 9e6a363 into master Feb 4, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Feb 4, 2020
@rhymes rhymes deleted the citizen428/readonly-config-in-admin-5384 branch February 4, 2020 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants