profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/josemigallas/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Jose Miguel Gallas Olmedo josemigallas Red Hat Málaga, Spain

josemigallas/CropableTextureView 1

Custom view for Android that displays a video crop-centering it to the layout boundaries as any ImageView does.

3scale-labs/porta-fly 0

PF4 React Porta Front End

josemigallas/aerogear-android-sdk 0

Mobile.Next() Android SDK

josemigallas/aerogear-ios-sdk 0

AeroGear Services Swift SDK

josemigallas/aerogear-js-sdk 0

AeroGear SDK for javascript, Apache Cordova and React Native.

josemigallas/aerogear-metrics-api 0

AeroGear Mobile metrics service

push event3scale/porta

josemigallas

commit sha 2e8073d073a6482a2836b5741af6839f8a5f2870

fixes minor bugs in NewApplicationForm and updates tests

view details

push time in a day

push event3scale/porta

josemigallas

commit sha 385b3bb88f3558b19cc0b9df669503880b67c32b

fixes and moves contracts data for new application page

view details

josemigallas

commit sha f83cbe7c9b1cb496edfff1cd8990c71140584510

adds posibility to hide pf4 Select's clearn button

view details

josemigallas

commit sha 248e86083a05f7726836db0de1ff71059bbdfa6f

fixes ServicePlanSelect logic regarding contracts

view details

push time in 2 days

Pull request review comment3scale/porta

Update new Application form to load data async

 class AccountDecorator < ApplicationDecorator   delegate :display_name, :email, to: :admin_user, prefix: true +  self.include_root_in_json = false++  def new_application_data+    {+      id: id.to_s,+      name: name,+      description: "Admin: #{admin_user_display_name}",+      createdAt: created_at.to_s(:long),+      contractedProducts: contracts,+      createApplicationPath: h.admin_buyers_account_applications_path(object),+      multipleAppsAllowed: multiple_applications_allowed?+    }+  end+   private    def admin_user     @admin_user ||= (super || User.new).decorate   end++  def contracts+    bought_service_contracts.map do |contract|+      hash = contract.service.as_json(only: %i[id name], root: false)+      hash['withPlan'] = contract.plan.as_json(only: %i[id name], root: false)

It's actually mapping the hash id and name 🤔 withPlan is lost and still the logic doesn't break. Maybe I added some redundancy? Could you check the following logic makes sense? https://github.com/3scale/porta/blob/e24aca233b76b5f727b065ac4095329247c2f27e/app/javascript/src/Logic/BuyerLogic.js#L12-L15

josemigallas

comment created time in 3 days

PullRequestReviewEvent

push event3scale/porta

josemigallas

commit sha 1816176f5cd506af2fb9b4837186b449860ff77d

provides a way to abort ongoing ajax requests

view details

josemigallas

commit sha aa0376b3767d35efffd1dce4003e60282baf41ef

makes ajax signature more flexible

view details

josemigallas

commit sha 98f28535851f63e2157997e8b50304106fc07eea

improves SelectWithModal to support async fetch of items

view details

josemigallas

commit sha fc5c202acd6c123f1f388f87dfa9a1a39ee43b5e

updates existing usages of SelectWithModal

view details

josemigallas

commit sha 8edaff50a2821f097c5beeee0ae40a39ae5e720d

adds a callback to abort fetchItems

view details

josemigallas

commit sha 63771528bfd3b1e1fed59e108ca5ebd43b35a223

updates TODO comment

view details

josemigallas

commit sha eb8b18286137a80f8df17507c2477ec239839e95

🚧 fixes local search

view details

josemigallas

commit sha dcac38e98cb64bbf85d274b311f20218139060d4

reorder props

view details

josemigallas

commit sha 0a50c00b19ab4ecd5965bc9becc62e881d5eefb0

✅ updates SelectWithModal tests

view details

josemigallas

commit sha 3ec2dbe2a6a4118fa4a3514d9c47581b5a4bd2fd

rename variables for better clarity

view details

josemigallas

commit sha abeca8d7ca37de7375f31341fbac5b5c25cb64fd

updates FIXME comment

view details

josemigallas

commit sha 749a02f84acb332d246b9c5610ac7567a6c56b5f

adds a TODO test

view details

josemigallas

commit sha 71c86b6330ddafa1d5818d84c1cba82c5100a753

adds TODO items to supress temporary Flow errors

view details

josemigallas

commit sha 05769f714a31ac196de670d358ed5358f6a14f9b

implement cancelling ongoing ajax requests

view details

josemigallas

commit sha 92bf903e7083be152339e3611e7d7f084ef485c7

removes implementation for aborting request

view details

josemigallas

commit sha d9dcae82ff0570354f57d20270e72030269042c1

* ✅ updates tests * fixes BackendSelect and SelectWithModal * Replaces TableModal with PaginatedTableModal

view details

Jose Miguel Gallas Olmedo

commit sha 36c6734388132672c9f10779115e70f37856c48c

Merge pull request #2610 from 3scale/2.11/async_select_with_modal Select with Modal with Async pagination

view details

josemigallas

commit sha 9fb2eeca41932dc0fc87c6aa5f8b018fd90a9a24

🚧 PF4 'methods & metrics' page for product context

view details

josemigallas

commit sha 9b852db8a88857e3b1aa5a35523d6ff74139ae78

moves duplicated method into test-utils module

view details

josemigallas

commit sha 0c144be7fd9b0c1f6936f4736d943ca88b6735de

adds info card for metrics

view details

push time in 3 days

push event3scale/porta

Aleksandar N. Kostadinov

commit sha b4d8a7a661ace98d737133f6d6ee3a957474eba5

declarations order of Account model

view details

Jose Miguel Gallas Olmedo

commit sha c49249a4beb79ec489470c21c7159e1ef7bc3613

Refactor utils ajax 2 (#2615) * 🏷️ removes generic type for argument header * fixes typo * 🐛 combines argument header with actual headers * provides a way to abort ongoing ajax requests * makes ajax signature more flexible

view details

josemigallas

commit sha 1816176f5cd506af2fb9b4837186b449860ff77d

provides a way to abort ongoing ajax requests

view details

josemigallas

commit sha aa0376b3767d35efffd1dce4003e60282baf41ef

makes ajax signature more flexible

view details

josemigallas

commit sha 98f28535851f63e2157997e8b50304106fc07eea

improves SelectWithModal to support async fetch of items

view details

josemigallas

commit sha fc5c202acd6c123f1f388f87dfa9a1a39ee43b5e

updates existing usages of SelectWithModal

view details

josemigallas

commit sha 8edaff50a2821f097c5beeee0ae40a39ae5e720d

adds a callback to abort fetchItems

view details

josemigallas

commit sha 63771528bfd3b1e1fed59e108ca5ebd43b35a223

updates TODO comment

view details

josemigallas

commit sha eb8b18286137a80f8df17507c2477ec239839e95

🚧 fixes local search

view details

josemigallas

commit sha dcac38e98cb64bbf85d274b311f20218139060d4

reorder props

view details

josemigallas

commit sha 0a50c00b19ab4ecd5965bc9becc62e881d5eefb0

✅ updates SelectWithModal tests

view details

josemigallas

commit sha 3ec2dbe2a6a4118fa4a3514d9c47581b5a4bd2fd

rename variables for better clarity

view details

josemigallas

commit sha abeca8d7ca37de7375f31341fbac5b5c25cb64fd

updates FIXME comment

view details

josemigallas

commit sha 749a02f84acb332d246b9c5610ac7567a6c56b5f

adds a TODO test

view details

josemigallas

commit sha 71c86b6330ddafa1d5818d84c1cba82c5100a753

adds TODO items to supress temporary Flow errors

view details

josemigallas

commit sha 05769f714a31ac196de670d358ed5358f6a14f9b

implement cancelling ongoing ajax requests

view details

josemigallas

commit sha 92bf903e7083be152339e3611e7d7f084ef485c7

removes implementation for aborting request

view details

josemigallas

commit sha d9dcae82ff0570354f57d20270e72030269042c1

* ✅ updates tests * fixes BackendSelect and SelectWithModal * Replaces TableModal with PaginatedTableModal

view details

josemigallas

commit sha 219cc6359f6bd81a808d91d6b7f786203a669bbd

updates Product and Backend overview microcopy

view details

Jose Miguel Gallas Olmedo

commit sha e63813fa8a647d13cfb750d95d6e8ebc669447a9

Merge pull request #2618 from 3scale/microcopy/THREESCALE-7044 Product and Backend overview microcopy

view details

push time in 3 days

push event3scale/porta

josemigallas

commit sha 41b5da556f8940b3fbd6e08cda6a393313e62aca

🚧 PF4 'methods & metrics' page for product context

view details

push time in 3 days

delete branch 3scale/porta

delete branch : 2.11/async_select_with_modal

delete time in 3 days

push event3scale/porta

josemigallas

commit sha 1816176f5cd506af2fb9b4837186b449860ff77d

provides a way to abort ongoing ajax requests

view details

josemigallas

commit sha aa0376b3767d35efffd1dce4003e60282baf41ef

makes ajax signature more flexible

view details

josemigallas

commit sha 98f28535851f63e2157997e8b50304106fc07eea

improves SelectWithModal to support async fetch of items

view details

josemigallas

commit sha fc5c202acd6c123f1f388f87dfa9a1a39ee43b5e

updates existing usages of SelectWithModal

view details

josemigallas

commit sha 8edaff50a2821f097c5beeee0ae40a39ae5e720d

adds a callback to abort fetchItems

view details

josemigallas

commit sha 63771528bfd3b1e1fed59e108ca5ebd43b35a223

updates TODO comment

view details

josemigallas

commit sha eb8b18286137a80f8df17507c2477ec239839e95

🚧 fixes local search

view details

josemigallas

commit sha dcac38e98cb64bbf85d274b311f20218139060d4

reorder props

view details

josemigallas

commit sha 0a50c00b19ab4ecd5965bc9becc62e881d5eefb0

✅ updates SelectWithModal tests

view details

josemigallas

commit sha 3ec2dbe2a6a4118fa4a3514d9c47581b5a4bd2fd

rename variables for better clarity

view details

josemigallas

commit sha abeca8d7ca37de7375f31341fbac5b5c25cb64fd

updates FIXME comment

view details

josemigallas

commit sha 749a02f84acb332d246b9c5610ac7567a6c56b5f

adds a TODO test

view details

josemigallas

commit sha 71c86b6330ddafa1d5818d84c1cba82c5100a753

adds TODO items to supress temporary Flow errors

view details

josemigallas

commit sha 05769f714a31ac196de670d358ed5358f6a14f9b

implement cancelling ongoing ajax requests

view details

josemigallas

commit sha 92bf903e7083be152339e3611e7d7f084ef485c7

removes implementation for aborting request

view details

josemigallas

commit sha d9dcae82ff0570354f57d20270e72030269042c1

* ✅ updates tests * fixes BackendSelect and SelectWithModal * Replaces TableModal with PaginatedTableModal

view details

Jose Miguel Gallas Olmedo

commit sha 36c6734388132672c9f10779115e70f37856c48c

Merge pull request #2610 from 3scale/2.11/async_select_with_modal Select with Modal with Async pagination

view details

push time in 3 days

PR merged 3scale/porta

Select with Modal with Async pagination

What this PR does / why we need it

In order to provider a responsive UI, we need to implement async pagination in our modals.

This PR extends the current SelectWithModal to allow fetching items and updating the component asynchronously without refreshing then page.

When fetchItems is not passed, the modal will rely on its local data. However, it is not in our interest to have a "local SelectWithModal" implementation: all our pages should provider async load of data and pagination.

### Verification steps: Pages where this modal is used:

  • New application /p/admin/applications/new:
    • Buyers select
    • Products select
  • Add backend to product apiconfig/services/2/backend_usages/new
  • New mapping rule apiconfig/services/2/proxy_rules/new
    • Methods select
    • Metrics select

In order to show the modal, there has to be at least 21 items in the select. Here's a couple of data seeds to create those items from the rails console:

provider = Account.find(2)
service = Service.find(2)

for n in 0..21 do
  # products
  create_service = ServiceCreator.new(service: provider.services.build)
  create_service.call(name: "API #{n}", description: "This is the product no. #{n}")

  # backends
  provider.backend_apis.create(name: "Backend #{n}", private_endpoint: "http://random.endpoint.foo:#{n}", description: "This is the backend no. #{n}")

  # account
  signup_params = Signup::SignupParams.new(plans: [], user_attributes: { email: "user_#{n}@user.com", username: "user_#{n}", password: 'password' },
                                                      account_attributes: { org_name: "Account no. #{n}" },
                                                      validate_fields: false)
  Signup::DeveloperAccountManager.new(provider).create(signup_params)

  # Methods and metrics
  begin
    service.metrics.build({ friendly_name: "Metric #{n}", unit: "unit #{n}", description: "This is the metric no. #{n}" }).save
  rescue; end
end
+831 -343

4 comments

26 changed files

josemigallas

pr closed time in 3 days

push event3scale/porta

josemigallas

commit sha a772d6d8e151d73d1a26bd7a9c2648d293c7fbac

adds new route and update controllers to support 3 contexts: buyer, service and audience

view details

josemigallas

commit sha d672a3616a75b5fb486141412c596d818770de1c

adds decorator for frontend data and helpers

view details

josemigallas

commit sha e860584b2a33ea099014bd0e7d68c0cbf2a3265f

implements Create Application page with React and PF4

view details

josemigallas

commit sha b3ebc5744f124626e13c518ef275210367986c6f

adds new ruby templates and upgrade existing ones to slim

view details

josemigallas

commit sha 0ec82b59494472d89214113c703aac85a4f6685b

🥒 fix/update/add cucumbers

view details

josemigallas

commit sha 83d42bbb433451902cf1f1a5cf05d4eeceffd6fb

✅ adds React tests

view details

josemigallas

commit sha afefa20fba449e4991d4d419242d7a909df88882

use helper to generate PF link

view details

josemigallas

commit sha ab7544b149ccd9a1ac7f79ba4d728d79e2412eb7

restore cucumber

view details

josemigallas

commit sha 08ed9b6436c0ef7733867abb85bd4e7e562b39d6

adds missing scenario

view details

josemigallas

commit sha 2952aa34edbf3d5bfa7e4791320f35bee64e14f9

moves logic out of application helper into provider decorator

view details

Jose Miguel Gallas Olmedo

commit sha f4ff341029c6f180077ec804dfd84a6fed4e9782

Merge branch 'master' into 2.11/APPDUX-761_762_763

view details

josemigallas

commit sha 54a0e5bea1fbc4910304cabcdc7d1945978d64b6

🥒 fixes typo in plan_steps

view details

josemigallas

commit sha 5262356b0bf8f9b64c0b2cb38c2a5087c9a4e9ef

adds TODO

view details

josemigallas

commit sha f4422dbacc884dddc1817f671abdf4818b431b2e

[codeclimate] reduces Assignment Branch Condition size

view details

josemigallas

commit sha be0bd669d34b168a62dfbdeea3ec539370d30a58

removes duplicated instance var @buyer and use @account

view details

josemigallas

commit sha 26ed403f4b701da2590897cc08ca5bcfba9163cc

🥒 fixes spam_protection feature

view details

josemigallas

commit sha 2862222ae3c89d20da06b8104e32086cf374ac74

refactor provider decorator, again

view details

josemigallas

commit sha 27f72e896765921c2e127d6d503822157f5d520d

refactor applications_controller

view details

josemigallas

commit sha 13d1afbf9432b35bb2b80d2f15083b9c25948378

refactor #find_buyer in application_controller

view details

Srijita Mukherjee

commit sha 873e205f1eca2ea1488f037f88874394ee92fa0d

Fixed THREESCALE-6428 - Add APIAP Routing policy just before APICast policy Signed-off-by: Srijita Mukherjee <srmukher@redhat.com>

view details

push time in 4 days

push event3scale/porta

josemigallas

commit sha 5b4d704ccd298c3a529146f09d76ed133e7a5abc

🚧

view details

push time in 4 days

push event3scale/porta

josemigallas

commit sha 3a8c5e187bd6da4746c6c34dabbbc68b5af92261

🚧 ⬆️ shoulda, shoulda-matchers, shoulda-context

view details

push time in 5 days

pull request comment3scale/porta

Select with Modal with Async pagination

LGTM, just don't forget to create the jiras/fix what we've discussed

Sure thing, I'll paste them here for future reference: https://issues.redhat.com/browse/THREESCALE-7576 https://issues.redhat.com/browse/THREESCALE-7577

josemigallas

comment created time in 5 days

pull request comment3scale/porta

Select with Modal with Async pagination

@josemigallas I've been manually testing the PR, and I've found some issues:

  • In New Application page, when no Application plans, an empty list is rendered (with background and shadow)

There should be a JIRA for that, if not, I'll create it.

  • In Add a Backend page, whit small screen, the navigation buttons "<<", "<" , ">" and ">>" disappear:

Yes, Patternfly will switch to mobile version on smaller screen sizes. I don't think we should worry about this right now since it happens everywhere not only this modal. I'll create a JIRA for it.

josemigallas

comment created time in 5 days

Pull request review comment3scale/porta

Select with Modal with Async pagination

 const BackendSelect = ({ backend, backends, onSelect, onCreateNewBackend, error         // $FlowIssue[incompatible-type] backend is compatible with null         item={backend}         items={backends.map(b => ({ ...b, description: b.privateEndpoint }))}+        itemsCount={backends.length}         cells={cells}-        helperTextInvalid={error}-        isValid={!error}-        modalTitle="Select a Backend"         // $FlowIssue[incompatible-type] It should not complain since Record.id has union "number | string"         onSelect={onSelect}         header="Most recently created Backends"-        footer="View all Backends"+        title="Select a Backend"+        placeholder="Select a Backend"+        footerLabel="View all Backends"+        helperTextInvalid={error}

Yes it's intentional, SelectWithModal is supposed to work with remote data always. I'll update them in follow up PRs like the one for New Application page.

josemigallas

comment created time in 6 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review comment3scale/porta

Select with Modal with Async pagination

 // @flow  import * as React from 'react'+import { useState, useEffect } from 'react' -import {-  FormGroup,-  Select,-  SelectVariant-} from '@patternfly/react-core'-import {-  toSelectOption,-  toSelectOptionObject,-  SelectOptionObject,-  handleOnFilter-} from 'utilities'-import { TableModal } from 'Common'+import { SortByDirection, sortable } from '@patternfly/react-table'+import escapeRegExp from 'lodash.escaperegexp'+import { FancySelect, TableModal } from 'Common'+import { paginateCollection } from 'utilities'  import type { Record } from 'utilities'+import type { FetchItemsRequestParams, FetchItemsResponse } from 'Types'  import './SelectWithModal.scss'  type Props<T: Record> = {+  label: string,+  fieldId: string,+  id: string,+  name: string,   item: T | null,-  items: T[],+  items: Array<T>,+  itemsCount: number,+  cells: Array<{ title: string, propName: string, transforms?: [typeof sortable] }>,   onSelect: (T | null) => void,+  header: string,   isDisabled?: boolean,-  isValid?: boolean,-  label: string,-  id: string,-  name?: string,-  helperText?: React.Node,+  title: string,+  placeholder: string,+  footerLabel: string,   helperTextInvalid?: string,-  placeholderText?: string,-  maxItems?: number,-  header?: string,-  footer?: string,-  cells: { title: string, propName: string }[],-  modalTitle: string,+  fetchItems: (params: FetchItemsRequestParams) => FetchItemsResponse<T> } +const PER_PAGE = 5 const MAX_ITEMS = 20-const HEADER = 'Most recently created'-const FOOTER = 'View all'  const SelectWithModal = <T: Record>({-  item,-  items,-  onSelect,-  isDisabled,-  isValid,   label,+  fieldId,   id,   name,-  helperText,-  helperTextInvalid,-  placeholderText,-  maxItems = MAX_ITEMS,-  header = HEADER,-  footer = FOOTER,+  item,+  items: initialItems,

initialItems is a label since items will be mutatable once fetchItems is implemented. This is a middle step.

josemigallas

comment created time in 6 days

PR opened 3scale/porta

⬆️ Update shoulda, shoulda-matchers, shoulda-context

Description

There are BigDecimal deprecation warning messages related to this gem:

shoulda-matchers-2.8.0/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb:251: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.

JIRA THREESCALE-7539: Resolve test deprecation warnings

+12 -12

0 comment

2 changed files

pr created time in 6 days

create barnch3scale/porta

branch : update_shoulda

created branch time in 6 days

delete branch 3scale/porta

delete branch : THREESCALE-7539_aws_autoload

delete time in 6 days

push event3scale/porta

josemigallas

commit sha 8716d732405ddf5c9c60fccc669a34b3dd38776b

🗑️ removes deprecated aws.eager_autoload

view details

Jose Miguel Gallas Olmedo

commit sha 094ff7ac3956070925e45721837f4771f2798179

Merge pull request #2620 from 3scale/THREESCALE-7539_aws_autoload 🗑️ AWS auto_load no longer needed

view details

push time in 6 days

PR merged 3scale/porta

🗑️ AWS auto_load no longer needed

When running cucumbers:

Aws.eager_autoload is no longer needed, usage of autoload has been replaced with require statements

THREESCALE-7539: Resolve Cucumber deprecation warnings

+0 -3

0 comment

1 changed file

josemigallas

pr closed time in 6 days

PR opened 3scale/porta

🗑️ AWS auto_load no longer needed

When running cucumbers:

Aws.eager_autoload is no longer needed, usage of autoload has been replaced with require statements
+0 -3

0 comment

1 changed file

pr created time in 6 days

create barnch3scale/porta

branch : THREESCALE-7539_aws_autoload

created branch time in 6 days

delete branch 3scale/porta

delete branch : microcopy/THREESCALE-7044

delete time in 6 days

push event3scale/porta

josemigallas

commit sha 219cc6359f6bd81a808d91d6b7f786203a669bbd

updates Product and Backend overview microcopy

view details

Jose Miguel Gallas Olmedo

commit sha e63813fa8a647d13cfb750d95d6e8ebc669447a9

Merge pull request #2618 from 3scale/microcopy/THREESCALE-7044 Product and Backend overview microcopy

view details

push time in 6 days

pull request comment3scale/porta

Select with Modal with Async pagination

Do I have to create a lot of Backends to see it working? Can you add a video, please?

@damianpm Ah, I should've added some steps to reproduce this of course. It is backwards compatible so expect everything to work exactly like in master. Real async pagination will come in #2459

josemigallas

comment created time in 8 days