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

Release/v4.0.0 #269

Closed
wants to merge 162 commits into from
Closed

Release/v4.0.0 #269

wants to merge 162 commits into from

Conversation

wkdewey
Copy link
Contributor

@wkdewey wkdewey commented Nov 7, 2022

renaming this branch, also I want to merge the later branches into this one

other work in this commit:
  split facet translation functionality into own method
  basic code cleanup to match styleguide recommendations

v1.0 version sends facets with just key: value
v1.1 (future) will send key: { source: , num: }

backwards compatible:
- value_label deprecated but forwards input to new method
  so apps that overrode the search result items or item
  show metadata pages are OK largely

not so much backwards compatible:
- if entire files were overridden like facets and browse_facets
  then instead of a num the app will display a hash
remaining code should be API agnostic as far as display and queries
apps which have overwritten helpers may encounter errors
I dunno what I was thinking when I wrote this code, because
looking at it today I couldn't figure out why I thought that was
a good idea. Must have just not been paying attention.
Also fixes comment which used the wrong value

Robocop agrees that it is bad.
https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint/CircularArgumentReference
it's an odd bug...considering we've used the paginator a lot
but I suspect it was due to various parameters I was plugging in
trying to get some deprecation warnings to show up in query.rb
matches up with each other for one thing, less confusing for another
keyword facets now returning with markup of this kind
but without sanitize that is just being hidden
renamed html_classes, as site_section was confusing given that
  there is a @section now
adds classes for section (@section), controller, action, page,
  and any custom strings the app passes in
pulls html_classes_page out into method which can be overridden
  more easily than entire html_classes method
does not go into as much depth about rvm
lists dependency information
there are some TODOs left in here, but it's taking shape!
not sure that this is the way that it will ultimately be
but I took some broad strokes at it
I left out some parts with high complexity, or explaining files like
application.scss and application.js, which I feel are somewhat
self-documenting. We can add that back if wanted!
wkdewey and others added 26 commits August 24, 2022 10:30
other work in this commit:
  split facet translation functionality into own method
  basic code cleanup to match styleguide recommendations

v1.0 version sends facets with just key: value
v1.1 (future) will send key: { source: , num: }

backwards compatible:
- value_label deprecated but forwards input to new method
  so apps that overrode the search result items or item
  show metadata pages are OK largely

not so much backwards compatible:
- if entire files were overridden like facets and browse_facets
  then instead of a num the app will display a hash
remaining code should be API agnostic as far as display and queries
apps which have overwritten helpers may encounter errors
matches up with each other for one thing, less confusing for another
keyword facets now returning with markup of this kind
but without sanitize that is just being hidden
@techgique
Copy link
Member

Will and I met on Zoom to discuss a number of things. These are my notes I prepared for the conversation with a couple edits with information Will shared. We decided it's best to close this and make a new PR with just the newer commits at the end of this branch.

My notes:

  • git flow branch naming - "release" branches are only for merging from dev into main. This branch is more focused on facet feature change and a name communicating that would be more helpful
  • The first 100-ish commits are old ones that I've already reviewed and are already on dev. There are some commits in here twice. Once towards the very beginning and later there are four commits by Jess that are committed again just before the new ones. Worried these being recommitted again later without others applied in the middle after them could have undesired results.
    • Where did you branch off of for the PR? Should have started off the tail of dev and merged other branches onto that as needed
      • Old branch renamed to release/v4 thus all the old commits
    • I think we want to rebuild this branch and PR by starting a new branch off the tip of dev and cherry-picking the last 20-ish commits that are the part that's actually new
  • Your commit pattern makes this hard to review and understand
    • Reviewing commit by commit is hard because each commit is just a small fraction of the overall changes that comprise a feature change / update. Looking at all files changed is a mess because of all the files changed from the first 100-ish commits already on dev
    • Keep interrelated changes for the same functionality together in a single commit. Big changes with lots of lines in the same commit are easier to review than tiny changes spread across 20 commits that are hard to put together into a bigger picture to understand their purpose
    • Some of the changes that are very closely related are a dozen commits apart
    • Git commit messages should help explain purpose and thinking behind decisions of how to approach the code changes
    • byebug lines and things that were undone because they didn't work or were trivial typos or syntax mistakes should be squashed or ignored with git rebase interactive. Not necessary or helpful for other code reviewers / devs to see those aspects of the development process
    • Links to blog posts to help with git commit strategy and making PRs friendly to reviewers
  • Engineering of facet handling
    • Code changes in lib/generators/templates/config.rb don't seem to do anything? If they do, it's not explained in the commit or made evident by other code changes. Other facet handling in views builds off of @page_facets which is retrieved from the Orchid::facets and Orchid::facets(section: name) without the wrapping get_facets code
      • Will showed where he made this change in Habeas config.rb. I need to explore this further after reviewing API code.
    • Using array element positions and arrays within arrays is opaque to those reading the code. Rather use a hash with key names that make things clearer from reading the code.
      • Will showed me the config YAML for Habeas and that looks good except we might change "alternate" to something like "aggregation_name" that is more descriptive and would help someone looking at the code connect things between API and Orchid code better
      • Whether this kind of change is possible or helpful TBD
    • Do tests still pass? Haven't checked. We should add or update unit tests for these kinds of changes to the inner workings of API, Datura, and Orchid

@wkdewey wkdewey mentioned this pull request Nov 21, 2022
@wkdewey wkdewey closed this Nov 21, 2022
@wkdewey wkdewey deleted the release/v4.0.0 branch November 21, 2022 15:10
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.

5 participants