profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/DjebbZ/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.
Khalid Jebbari DjebbZ Freelance Paris, France Clojure/ClojureScript/Javascript Web developer. Former @parisjs and @bow-paris co-organizer.

DjebbZ/browserify-paris-js 2

Introduction to Browserify presented at Paris.js #34

bobylito/parisjs-website 1

The Website of parisjs.org

DjebbZ/async-paris-js 1

Presentation of async.js during Paris.js #28

DjebbZ/backbone 1

Give your JS App some Backbone with Models, Views, Collections, and Events

DjebbZ/breakouts 1

Collection of JS engine implementations of Breakout

DjebbZ/angular-bacon 0

Angular-bacon.js bindings

DjebbZ/angular-phonecat 0

Tutorial on building an angular application.

DjebbZ/angular-playground 0

Playground for learning Angular.js

DjebbZ/another-json-schema 0

Another JSON Schema validator, simple & flexible & intuitive.

pull request commentmarmelab/react-admin

Fix examples of ra-test with fake dataProviders

Furthermore, .resolve() doesn't exist on jest.fn().

DjebbZ

comment created time in 3 hours

PR opened marmelab/react-admin

Fix examples of ra-test with fake dataProviders

You helped me in https://github.com/marmelab/react-admin/issues/6597, so I figured I could make the docs better for future me and everyone.

I haven't tested the code to see if it works. Also, a few notes:

  • contrarily to some test I've seen in the react-admin code base, I didn't need the await act(async () => await new Promise(r => setTimeout(r))); dance. It seems that simply awaiting was enough to follow properly the event loop.
  • I've simplified the jest.fn().resolve since the examples weren't using the mocked function for some assertions
  • I've replace queryBy with findBy which is the asynchronous equivalent. In my own code, it's required or the rendered content is the inital one before the dataProvider was called.

Feel free to adjust the code before merging, there's no guarantee it's correct in the context of the examples.

+27 -21

0 comment

1 changed file

pr created time in 4 hours

push eventDjebbZ/react-admin

Khalid Jebbari

commit sha b9a3a8e0aa64d742a79034510bb2311fc01c1b13

Fix examples of ra-test with fake dataProviders

view details

push time in 4 hours

issue commentmarmelab/react-admin

[ra-test] No way to use custom dataProvider as shown in the examples

Thanks for the pointer !

It kinda works because we now move the loaded/loading booleans correctly, but the total received inside our list is still undefined. I need to wrap my head around what's happening in useGetMainList.

DjebbZ

comment created time in 7 hours

issue openedmarmelab/react-admin

[ra-test] No way to use custom dataProvider as shown in the examples

In the ra-test README, the last examples declare a custom dataProvider but then never use them. And <TestContext /> don't provide a way to pass a custom dataProvider (I've read the code).

Is this an unimplemented possibility ? A bug in the documentation ? Something missing ?

created time in 9 hours

issue commentmarmelab/react-admin

Allow resources without a listView in the Menu

Ok, I sorted it out 100%. We started without a custom menu, and got used to the DummyListPage trick to make entries in the left menu for resources without list page. We had to use customRoutes, <Switch> and all I described above. We didn't realize that simply declaring the show/edit/create pages and adding a custom menu entry is enough to be able to use normally the Show, Create, Edit components (that call the controller which interacts with the dataProvider etc.). We switched to a custom menu some time ago but didn't take the time to investigate all of this.

I just declared the pages, added a custom menu entry , and now it's really just "normal" React-admin, as in the documentation. RA is even more awesome to my eyes now. Thanks for the guidance!

DjebbZ

comment created time in 11 days

issue commentmarmelab/react-admin

Allow resources without a listView in the Menu

Indeed, I manage to get something almost perfect and boilerplate-free without changing our already existing custom menu. Just need to find where the list requirement live in RA's code, can point it to me ?

DjebbZ

comment created time in 12 days

issue openedmarmelab/react-admin

Allow resources without a listView in the Menu

Is your feature request related to a problem? Please describe. First of all, not sure if it's a feature request, a bug report or a support question. Sorry, I'm a bit confused.

The problem I have is that some resources we have don't have a list view, the resource itself is just an editable object (think a config object for example). I haven't find a way simple way to add such resources in the Menu without doing hacks and what I think is useless and cumbersome plumbing.

What we do is the following, and the problems we face (the example below consider a resource with Show and Edit views) :

  • Create a <Resource> with a dummy list component so that it appears in the menu:
    export const DummyListPage = (props) => {
      return (
          <List {...props}>
              <Datagrid />
          </List>
      );
    }; 
    
  • Add customRoutes in the <Admin> component that overrides the list URL that's supposed to be used for the List view
  • In this component, fetch the data with a manual useQuery and instantiate 2 <Route> wrapped with a <Switch> for the Show and Edit views, which get passed the fetched record:
    <Switch>
      <Route path="/my-resource/my-resource-id/show"><MyShowComponent record={data} /></Route>
      <Route path="/my-resource/my-resource-id"><MyEditComponent record={data} /></Route>
    </Swtich>
    
  • The custom Show and Edit components use react-admin's <Show> and <Edit> component, but we manually pass the basePath, resource, record and the id.

Describe the solution you'd like A new option in the <Resource> component called i.e. defaultView with values list | show | create | edit. If I use show for example, the Show component I write is called normally with the intended props. Same for edit etc. We wouldn't need custom routes, we wouldn't need to manually call useQuery, we wouldn't need a DummyListPage, we would declare the Show and Edit normally in the <Resource> and everything would work as advertised in the documentation. I feel like all the plumbing/customization I'm doing doesn't bring value because it's not related to a custom feature I'm implementing but a limitation of React-admin.

Describe alternatives you've considered I've also tried to add the Show and Edit normally in <Resource> and to replace the <Route> in customRoutes with a <Redirect from="/path/to/list" to="path/to/show" />, but it seems to create an infinite loop of setState and displays an error.

I've also tried to add the Show and Edit normally in <Resource>, keep the <Switch /> but I get an empty Show page without an error.

Additional context Thanks in advance for taking the time to read this issue!

created time in 12 days

issue commentseppevs/migrate-mongo

Hidden breaking change in latest patch

Other breaking change: the type definition that comes with the major update of mongodb in 8.2.3 make our migration code not compile because the type of a path in $addToSet is now never instead of string (!?) or something like that. Fixed on version 8.2.2, haven't nailed down the underlying change exactly.

Parnswir

comment created time in 17 days

issue commentmarmelab/react-admin

Who is using react-admin?

Hello,

We're Ubisoft (the Ubisoft Paris studio) and we're using react-admin for an internal back-office to operate our games once they're live: sending messages to players, sending them rewards for events and compensation when there's bug in the game, manage the in-game shop (including in-app purchases) and other stuff. Super happy with react-admin and the way it's managed, and really looking forward to see it getting better.

fzaninotto

comment created time in 24 days

pull request commentmarmelab/react-admin

Fix BooleanInput initialValue overrides existing value from record

I think I had weird build problems, couldn't run my app afterwards. Then other things to do so didn't have time to dig the issue. 100% believe you, if you want to merge and cut a release, feel free :)

fzaninotto

comment created time in 24 days

pull request commentmarmelab/react-admin

Fix BooleanInput initialValue overrides existing value from record

Code looks good to me, but I still have the problem. It's either something bad on my side or something I have wrongly specified in the reproduction steps. Will continue looking at it today.

fzaninotto

comment created time in 24 days

pull request commentmarmelab/react-admin

Fix BooleanInput initialValue overrides existing value from record

Testing the fix locally...

fzaninotto

comment created time in 24 days

issue commentmarmelab/react-admin

initialValue on BooleanInput inside ArrayInput resets value of BooleanInput on Edit

Sorry, did you have time to look at it ?

DjebbZ

comment created time in 25 days

issue openedmarmelab/react-admin

initialValue on BooleanInput inside ArrayInput resets value of BooleanInput on Edit

What you were expecting: When editing a record that contains a BooleanInput inside an ArrayInput, the BooleanInput should have the last known value.

What happened instead: When editing, the BooleanInput displays the initialValue. Which means that after saving the BooleanInput is reset to its initialValue.

Steps to reproduce: In the CodeSandbox below :

  1. Click on the SHOW of the first record in the Posts list
  2. Notice that the boolean value of the first element of Backlinks array is set to true
  3. Click on EDIT
  4. Notice that the BooleanInput is not set to true but to false
  5. Go back to SHOW without saving and notice the value is true so it should be true in the edit view
  6. Now click on EDIT, then SAVE without changing anything
  7. Notice that the boolean field is now false instead of true.

Related code: https://codesandbox.io/s/brave-dhawan-l5sfk

Other information: <!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. For visual or layout problems, please include images or animated gifs.-->

Environment

  • React-admin version: 3.17.0
  • Last version that did not exhibit the issue (if applicable): Don't know
  • React version: 17
  • Browser: Tested in Chrome, Firefox, Brave.
  • Stack trace (in case of a JS error): No stack trace.

created time in a month

issue commentValveSoftware/steam-for-linux

Remote play frozen if resolution is fullscreen or too high on Linux Host

I can confirm the bug, and more: when in a dual screen setup like me (1 3840x1600 screen, 1 1080p), I have to set the resolution with xrandr so that the big screen displays the same thing than the small one, at the same resolution. Only then Steam Link on my Android phone displays the game properly.

Saroumane

comment created time in 3 months

PR opened aws/serverless-application-model

Fix ProvisionedConcurrentExecutions type

See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-provisionedconcurrencyconfiguration.html

Description of changes:

Typo in documentation, wrong type used.

Description of how you validated changes:

I used the right type ("integer") and successfully deployed a lambda. Didn't try with what looks to me the wrong type ("string").

Checklist:

  • [X] Update documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

+1 -1

0 comment

1 changed file

pr created time in 3 months

push eventDjebbZ/serverless-application-model

Khalid Jebbari

commit sha e291b00b209d0b9e48fd7d9d0640b770bc53908e

Fix ProvisionedConcurrentExecutions type See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-provisionedconcurrencyconfiguration.html

view details

push time in 3 months

fork DjebbZ/serverless-application-model

AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications

https://aws.amazon.com/serverless/sam/

fork in 3 months