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

feature: combobox field #3381

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feature: combobox field #3381

wants to merge 5 commits into from

Conversation

adrianthedev
Copy link
Collaborator

@adrianthedev adrianthedev commented Nov 2, 2024

Description

Important

This needs to be another gem.

Fixes #3317
Related to #2711

Other PRs: #2646 & #2718

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

Screenshots & recording

Manual review steps

  1. Step 1
  2. Step 2

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

Copy link

codeclimate bot commented Nov 2, 2024

Code Climate has analyzed commit 627f4af and detected 0 issues on this pull request.

View more on Code Climate.

@@ -1,3 +1,6 @@
require 'net/http'
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 🐶
[Corrected] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -1,3 +1,6 @@
require 'net/http'
require 'json'
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 🐶
[Corrected] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@adrianthedev
Copy link
Collaborator Author

Still waiting for a response on this thread in regards to supporting objects as values.

josefarias/hotwire_combobox#221

class Avo::Fields::ComboboxField::EditComponent < Avo::Fields::EditComponent
def name_when_new
if @field.accept_free_text
"#{@resource.form_scope}[#{@field.for_attribute}]"
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 🐶
[Corrected] Layout/IndentationWidth: Use 2 (not 1) spaces for indentation.

@adrianthedev
Copy link
Collaborator Author

This field needs to be another gem.
The reason is that it does not support Rails 6.1 so it will be difficult to ignore it in tests but also because it adds another dependency (in gemspec and some styles) to installations that potentialy don't need it.

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

Successfully merging this pull request may close these issues.

tags field select mode UX glitches
2 participants