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

Upgrade to Avo 3 #2044

Merged
merged 9 commits into from
Nov 21, 2023
Merged

Upgrade to Avo 3 #2044

merged 9 commits into from
Nov 21, 2023

Conversation

adrianthedev
Copy link
Collaborator

Description

The big PR. The upgrade to Avo 3.

Avo 2 to Avo 3 upgrade guide.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Manual review steps

  1. Run bin/dev
  2. You see Avo 3

Manual reviewer: please leave a comment with output from the test if that's the case.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 26416 lines exceeds the maximum allowed for the inline comments feature.

Copy link

codeclimate bot commented Nov 21, 2023

Code Climate has analyzed commit 195ca1a and detected 34 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 32
Duplication 2

View more on Code Climate.

@@ -1,8 +1,8 @@
# frozen_string_literal: true

class Avo::Fields::BelongsToField::EditComponent < Avo::Fields::EditComponent
def initialize(**args)
super(**args)
def initialize(...)
Copy link
Contributor

Choose a reason for hiding this comment

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

[rubocop] reported by reviewdog 🐶
Lint/Syntax: unexpected token tDOT3

end
end

def singular_name
name
def hydrate(...)
Copy link
Contributor

Choose a reason for hiding this comment

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

[rubocop] reported by reviewdog 🐶
Lint/Syntax: unexpected token tDOT3

class << self
def encrypt(message:, purpose:)
new(message: message, purpose: purpose).encrypt
def encrypt(...)
Copy link
Contributor

Choose a reason for hiding this comment

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

[rubocop] reported by reviewdog 🐶
Lint/Syntax: unexpected token tDOT3

end

def decrypt(message:, purpose:)
new(message: message, purpose: purpose).decrypt
def decrypt(...)
Copy link
Contributor

Choose a reason for hiding this comment

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

[rubocop] reported by reviewdog 🐶
Lint/Syntax: unexpected token tDOT3

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 26418 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 26411 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 27049 lines exceeds the maximum allowed for the inline comments feature.

}

connect() {
const vm = this;
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <semi> reported by reviewdog 🐶
Extra semicolon.

Suggested change
const vm = this;
const vm = this

const vm = this;

tippy(vm.context.element, {
content: "loading...",
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <quotes> reported by reviewdog 🐶
Strings must use singlequote.

Suggested change
content: "loading...",
content: 'loading...',

@@ -0,0 +1,15 @@
/* eslint-disable camelcase */
import { StreamActions } from '@hotwired/turbo'
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <import/no-extraneous-dependencies> reported by reviewdog 🐶
'@hotwired/turbo' should be listed in the project's dependencies. Run 'npm i -S @hotwired/turbo' to add it


// TODO: move these to the avo_filters gem

StreamActions.close_filters_dropdown = function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [eslint] <func-names> reported by reviewdog 🐶
Unexpected unnamed function.

document.querySelector('.filters-dropdown-selector').classList.add('hidden')
}

StreamActions.open_filter = function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [eslint] <func-names> reported by reviewdog 🐶
Unexpected unnamed function.

'./app/views/**/*.html.erb',
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
]
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <comma-dangle> reported by reviewdog 🐶
Missing trailing comma.

Suggested change
]
],

850: '#232629',
900: '#17191C',
}
const preset = require('./tailwind.preset.js')
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Unexpected use of file extension "js" for "./tailwind.preset.js"

const defaultTheme = require('tailwindcss/defaultTheme')

const { primary, blue, gray } = require('./tailwind.custom')
const avoPath = require('child_process').execSync('bundle show avo', { encoding: 'utf-8' }).trim()
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <import/order> reported by reviewdog 🐶
child_process import should occur before import of ./tailwind.custom

cursor: ['responsive', 'disabled'],
},
plugins: [
require('@tailwindcss/forms'),
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <global-require> reported by reviewdog 🐶
Unexpected require().

},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <global-require> reported by reviewdog 🐶
Unexpected require().

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 27049 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 27053 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 27066 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 27118 lines exceeds the maximum allowed for the inline comments feature.

@adrianthedev adrianthedev merged commit 469636c into main Nov 21, 2023
9 of 11 checks passed
@adrianthedev adrianthedev deleted the feature/avo-3 branch November 21, 2023 12:22
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

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.

2 participants