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

Filtering and selecting embedded methods used in the inline-methods form pages #9059

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffibm
Copy link
Member

@jeffibm jeffibm commented Jan 30, 2024

Related PR - ManageIQ/manageiq#22921 (used for named scopes)

Last update in here - #9059 (comment)

  • Create AeInlineMethods component to render the list and add method button
  • Create a modal to display the list.
  • Create a Selector component
  • Create 3 methods in miq_ae_class_controller
  • ae_domains - to list all domains
  • ae_methods - to -list all methods
  • ae_method_opertions - to update the ruby form with selected methods
  • Use named scopes for search
  • Fetch domains and methods and list them in the selector component
  • Create a filter component
  • search with the method name using text box
  • Clear search text
  • Filter the list with domain names
  • Display the loader on filter change to fetch the results from API
  • Selecting an item from search results
  • Multi-select using checkbox
  • remove the selected items using the checkbox
  • List the items on modal submit action
  • Preselect the items on search result
  • Use accordion to wrap the component
  • cache request using react-query
  • debounce search text using lodash
  • memorised the list using useMemo
  • memorised the onSearch with useCallback
  • Integrated react component with ruby form
  • Remove old code
  • Fix test cases
  • Preview of the selected item - maybe for another PR
  • Introduce infinite scrolling - maybe for another PR

image

image

GET: http://...miq_ae_class/ae_domains

{
    "domains": [
        {
            "name": "Costs",
            "id": 1082
        },

GET: http://..../miq_ae_class/ae_methods

{
    "methods": [
        {
            "id": 3214,
            "name": "AWS_calculate_cost",
            "relative_path": "RedHat/CloudForms/CalculateCost/AWS_calculate_cost"
        },

@jeffibm jeffibm requested a review from a team as a code owner January 30, 2024 15:31
@miq-bot miq-bot added the wip label Jan 30, 2024
@jeffibm jeffibm force-pushed the method-list-dialog branch 2 times, most recently from b0a7cdf to ecffe86 Compare February 28, 2024 13:55
@jeffibm
Copy link
Member Author

jeffibm commented Feb 29, 2024

Screen.Recording.2024-02-29.at.4.48.40.PM.mov

@@ -0,0 +1,55 @@
.inline-method-selector {
Copy link
Member Author

Choose a reason for hiding this comment

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

move this file to the global css path

@jeffibm jeffibm force-pushed the method-list-dialog branch 5 times, most recently from 34ad4da to c32d67a Compare March 1, 2024 12:56
@jeffibm jeffibm mentioned this pull request Apr 2, 2024
@jeffibm jeffibm force-pushed the method-list-dialog branch 2 times, most recently from 4b0692c to d52357d Compare May 7, 2024 07:56
@jeffibm
Copy link
Member Author

jeffibm commented May 7, 2024

Update as of May 7, 2025

  • Debounced the search text to reduce API call for every keystroke using loadash
  • Cached the API request and displays the response from cache by using react-query
Screen.Recording.2024-05-07.at.9.16.40.PM.mov

@jeffibm jeffibm force-pushed the method-list-dialog branch 3 times, most recently from 4f76227 to d93c66e Compare May 8, 2024 04:40
@jeffibm
Copy link
Member Author

jeffibm commented May 18, 2024

Update as of May 18, 2025

  • Integrated the React component with the ruby form -
  • style fix in data tables
Screen.Recording.2024-05-18.at.9.45.41.AM.mov

@jeffibm jeffibm force-pushed the method-list-dialog branch 2 times, most recently from e528d57 to d00ae34 Compare May 20, 2024 12:56
@jeffibm jeffibm changed the title [WIP] Method list dialog Filtering and selecting embedded methods used in the inline-methods form pages May 20, 2024
@miq-bot miq-bot removed the wip label May 20, 2024
@miq-bot
Copy link
Member

miq-bot commented May 20, 2024

Checked commit jeffbonson@bf9b57c with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
3 files checked, 2 offenses detected

app/views/miq_ae_class/_embedded_methods.html.haml

  • ⚠️ - Line 6 - Avoid using instance variables in partials views
  • ⚠️ - Line 6 - Line is too long. [90/80]

@GilbertCherrie
Copy link
Member

This pr looks good, once the core pr is ready to be merged this can be merged with it.

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

Successfully merging this pull request may close these issues.

None yet

4 participants