profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/azrikahar/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.

azrikahar/docker-reverse-proxies 38

Sample usage for various reverse proxies in Docker setups

azrikahar/directus 1

Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.

azrikahar/AudioMass 0

Free full-featured web-based audio & waveform editing tool

azrikahar/homer 0

A very simple static homepage for your server.

azrikahar/logseq 0

A privacy-first, open-source(frontend now, backend later) platform for knowledge management and collaboration. Desktop app download link: https://github.com/logseq/logseq/releases, roadmap: https://trello.com/b/8txSM12G/roadmap

azrikahar/nuxt-content-docs-external-link 0

Example to show how to add external link icon to default Nuxt Content Docs theme

azrikahar/nuxt-svg-from-library-example 0

Example for using Nuxt SVG module with 3rd party icon libraries

push eventazrikahar/directus

Nicola Krumschmidt

commit sha 890501fa66271cf749667079f80b38955f85622f

Fix the port being duplicated in parsed URLs (#8117) Fixes #8114

view details

ian

commit sha 9d11714fb19e8bc35d2dff9d6ae4f585d39e8dbb

Fixed missing documentation due to directory-tree update (#8115)

view details

Rijk van Zanten

commit sha 82cd7077edc5f4f41e9e4bc1ebbf31c0827796b3

Update CODEOWNERS

view details

renovate[bot]

commit sha 62282570a5d9667df007236add8710d4d3ae2ed3

Update dependency date-fns to v2 (#8102) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Dieter Luypaert

commit sha aadb699e110b456a3613fad4278379ec047f5721

Add extensions-sdk watch build option (#7856)

view details

renovate[bot]

commit sha db99e435e64a75189d8043f55270b9033c1e7cac

Update vue monorepo to v3.2.12 (#8120) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Rijk van Zanten

commit sha 9c53dcadf0b7fd19b2c4b8b92503bc37aaa3fa63

Update changelog.md

view details

renovate[bot]

commit sha 3c9d84319e2c416e51ee3010dcee53d2176413e9

Update dependency eslint-plugin-vue to v7.18.0 (#8112) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 05eeb9a08583de8f808054d8683fd6302f3456a3

Update gatsby monorepo to v3.14.0 (#8126) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Azri Kahar

commit sha f7954a1650b3b0d5e846330c9395ad7276a56577

add error handling for image component (#8097)

view details

renovate[bot]

commit sha 8e8e67a2382cd4f205b4d08e14fe6cc24962f663

Update dependency vite to v2.5.8 (#8095) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha f712670eea898ae304e1094fe769c4c385e5825d

Update dependency sass to v1.41.1 (#8093) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

renovate[bot]

commit sha 9fa79dd2e7d96919f37f0e0893c2d18dcf2fe2c3

Update dependency npm to v7.24.0 (#8094) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Rijk van Zanten

commit sha 09c54034f8218bce1635be72f3ffc8346f1ea1ec

Update changelog.md

view details

Rijk van Zanten

commit sha 76ce24b65e934a1870c5c2b601cda601aed1e27d

New Crowdin updates (#8105) * New translations en-US.yaml (Italian) * New translations en-US.yaml (Italian) * New translations en-US.yaml (Italian)

view details

Azri Kahar

commit sha cc7394bf1d8b0ea411952127884c65871e7f6f97

Prevent null being converted to empty object in deepMap utility function (#8103) * prevent null to empty object conversion in deepmap * Use isObjectLike instead of explicit null check Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>

view details

Azri Kahar

commit sha 497f9cef19ab8b050cc5cb97b0ab5f7d45d8a2b8

Display error when image exceeds `ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION` limit (#8069) * display error when image exceeds transform limit * use img error event handler * Use generic error translations * Fix unknown translation check Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>

view details

rijkvanzanten

commit sha 89e7ee83f4d332be902d188e5dc02dab304100d4

Fix linter warning

view details

Joel Bohorquez

commit sha 4e042c641825056d381b250926089be465e8b890

Add support for custom claims before issuing a JWT. (#7906) * add event auth.jwt.before * document event auth.jwt.before * fix event auth.jwt.before Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

view details

Rijk van Zanten

commit sha 5e4e96f3cde3f5f4930c9dd339365e23a2dbd569

New Crowdin updates (#8128)

view details

push time in 12 hours

delete branch azrikahar/directus

delete branch : issue-7996

delete time in 12 hours

delete branch azrikahar/directus

delete branch : fix-deepmap

delete time in 12 hours

delete branch azrikahar/directus

delete branch : image-error-handling

delete time in 12 hours

pull request commentdirectus/directus

Translate system fields when creating new collections

@licitdev that's understandable. However there are quite a lot of localised text on the UI in general, so not sure if we can go with the label/tag approach. Though I do recall there was a similar question over here #5079 (check the comments where they discussed about it), so maybe the "localised text" indicator would be more appropriate within such feature.

azrikahar

comment created time in a day

issue commentdirectus/directus

Can't launch Directus locally

The public url doesn't really change the port, but more so just for url resolution. It is odd that the config you shared doesn't show any PORT=3055, but it most likely just proxied from 3055 to localhost:8055. Are you sure it's 3055? you can check on the terminal:

WindowsTerminal_VaQLeVMF2p

And the reason it wasn't working (/admin) is because 8055/3055 is the API, not the APP. You should use the APP port which should be 8080 by default.

With that said, you can try to do the following:

  • add/change these 2 env variables:
    PORT=8055
    PUBLIC_URL="http://localhost:8080"
    
  • run npm run dev -- --scope directus --scope @directus/app
  • wait app & api to start up (refer the above screenshot)
  • go to http://localhost:8080 (not 8055)
  • if you see this, click on the /admin/admin link: chrome_HwWJKKIaDo
aerdnach

comment created time in a day

issue commentdirectus/directus

INVALID_QUERY when browsing collections using archive field

@licitdev welcome, but then again good bug report precedes fast bug fix!

though I'll still need confirmation on whether my fix is appropriate, so let's wait and see.

licitdev

comment created time in a day

pull request commentdirectus/directus

Add possibility to translate Published, Draft and Archived strings

@jrvidotti just to reply your question, t() is provided by vue-i18n, whereas $t: is for a Directus app specific utility function here: https://github.com/directus/directus/blob/main/app/src/utils/translate-object-values.ts

hope that clears things up 👍

jrvidotti

comment created time in a day

PR opened directus/directus

Translate system fields when creating new collections

Bug

The choices for Status are not translated:

chrome_lzzdnr8UYT

Investigation

These translations were introduced in #7925, but they were never actually parsed/translated ($t:) before being used to create new collections, as seen at the end of getSystemFields() function:

https://github.com/directus/directus/blob/9967274ab276a4adfe4a76b775b614cf940dcb27/app/src/modules/settings/routes/data-model/new-collection.vue#L454

Solution

Ensure getSystemFields() returns translated fields by wrapping translate() around the returned fields array.

After fix

chrome_POi0nUOnxq

+2 -1

0 comment

1 changed file

pr created time in a day

create barnchazrikahar/directus

branch : translate-system-fields

created branch time in a day

PR opened directus/directus

Reviewers
Prevent null being converted to empty object in deepMap utility function

Closes #8096

Reported Bug

When we leave Archive Value as null for a particular collection:

chrome_8M4QxA2wT3

We will face error when viewing that collection:

ws1wHjdxQA

The underlying API call for it does have the filter filter: {"status":{"_neq":null}}. However I believe _neq=null is an acceptable filter for string so it should qualify as a bug, and it must be a recent change/regression as the issue owner mentioned that it used to work in the past.

Investigation

If we check the validateFilterPrimitive function, it does return true if the value is null. Only if it's not, then it will return the error shown above:

https://github.com/directus/directus/blob/9967274ab276a4adfe4a76b775b614cf940dcb27/api/src/utils/validate-query.ts#L94-L102

Since the API call does request for _neq: null, what gives? As we can see here, the resulting query filter actually shows that it is an empty object, not null:

Code_jAePeYEBKH

Seems like in the SanitizeFilter, which happens before validateQuery, the deepmap function is responsible for turning null into an empty object:

  • Before processed by deepmap, it's null: Code_J0RzRhYdxT

  • After processed by deepmap, it's {}: Code_vlcjHVKcLl

Finally looks like typeof null === 'object' DOES equals to true, that's why it's turned into {}:

nITT5mKkf4

Solution

Added object !== null to ensure it's not turned into an empty object.

Uncertainty

Is the empty object by any chance an intended feature? Also not sure if this will break anything where they intentionally wants empty object instead of null.

I'm also unsure whether we need to add the object !== null check here:

https://github.com/directus/directus/blob/9967274ab276a4adfe4a76b775b614cf940dcb27/packages/shared/src/utils/deep-map.ts#L9

+1 -1

0 comment

1 changed file

pr created time in a day

push eventazrikahar/directus

Azri Kahar

commit sha 907e6cdc1ce2bb428a9324e3bb97f1b059ed8baa

prevent null to empty object conversion in deepmap

view details

push time in a day

create barnchazrikahar/directus

branch : fix-deepmap

created branch time in a day

issue commentdirectus/directus

INVALID_QUERY when browsing collections using archive field

@licitdev ah.. apparently this isn't really an issue with archive at all, as you mentioned it worked for you previously even if it's null.

Apparently the recent support for geometry & map necessitate deep parsing of query filters, but in the process, it changed _neq: null into _neq: {} (empty object), which is why your error shows it must be string/number/boolean (null is also ok), but it ended up being an empty object instead.

So basically this is a general query filter issue, not isolated to archive filter only, but your scenario uncovered this quirk 😆 Will create the PR soon

licitdev

comment created time in a day

issue commentdirectus/directus

INVALID_QUERY when browsing collections using archive field

@licitdev do you know/recall what was the previous version you're on before going to rc.93?

licitdev

comment created time in a day

issue commentdirectus/directus

INVALID_QUERY when browsing collections using archive field

@licitdev glad that solves it. Hmm honestly I can't say I entirely recall that it didn't have to be set previously, but I just tested in rc.92 and rc.93 just now, and ticking/choosing Status when creating a new Collection does defaults Archive Value and Unarchive Value to archived and draft automatically. Can you try creating a new dummy collection and see whether that is true for your setup as well?

licitdev

comment created time in a day

issue commentdirectus/directus

INVALID_QUERY when browsing collections using archive field

Thanks for the detailed info! Is the Status field the default one available when you create this collection? or did you add it manually afterwards? I'm wondering why there's no value for Archive Value and Unarchive Value as seen in your screenshot.

With that said, would you mind trying to set Archive Value and Unarchive Value to archived and draft respectively, and see does the issue goes away? of course assuming you are using the default status field. Sample screenshot:

chrome_9SRNYNhAlc

licitdev

comment created time in 2 days

PR opened directus/directus

add error handling for image component

Bug

Part of investigation from #8069.

The image preview in tabular view is broken:

chrome_r3OLaFX4mW

There's already an existing imgError variable to handle image load errors, but it was never hooked up to any error handler like @error.

Solution

  • Add error handler
  • set the fallback icon as a generic image icon (previously no value)
  • renamed imgError to imageError just for clearer naming

After fix

chrome_kLGjZDk68F

Question

Do we need to handle error such as ILLEGAL_ASSET_TRANSFORMATION here? Arguably a better UX might be to handle it, then use a different icon + add a tooltip on hover showing "image too large to preview" or something, but on the other hand it might be unnecessary.

+11 -4

0 comment

1 changed file

pr created time in 2 days

create barnchazrikahar/directus

branch : image-error-handling

created branch time in 2 days

pull request commentdirectus/directus

Display error when image exceeds `ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION` limit

Update (see main post for screenshots):

  • moved error handling to @error event for <img>
  • added "generic" error type to show image cannot be loaded, in case the error isn't ILLEGAL_ASSET_TRANSFORMATION. (not sure if this will ever happen?)
  • added relevant translation keys.
azrikahar

comment created time in 2 days

push eventazrikahar/directus

Azri Kahar

commit sha 832aa66f67219499cf2d5f66feb4876ef082f967

use img error event handler

view details

push time in 2 days

issue commentdirectus/directus

permission error when uploading file

Would you mind trying to run sudo chown -R 1000:1000 /home/test/directus/uploads? I understand this is a workaround atm, but we'll try to look into this and see is there a more permanent resolution.

ghezeli

comment created time in 2 days

pull request commentdirectus/directus

Display error when image exceeds `ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION` limit

Unfortunately, I‘m not at the computer to check this myself. But did you also think of the image in the list view of a collection? It was also erroring out

Ya I also noticed that as I was investigating this issue. but I felt like the image in list view + image in files preview are more similar in nature (based on their logic in the source code), so I'm planning to fix those in a separate PR. 👍

azrikahar

comment created time in 2 days

push eventazrikahar/directus

Rijk van Zanten

commit sha 45f5abadb47e2700fef121ecb22d82d5bb6cd697

New translations en-US.yaml (Italian) (#8068)

view details

renovate[bot]

commit sha b76bad1be3095022a691c07321cf4fc880e3fc07

Update dependency prettier to v2.4.1 (#8070) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Rijk van Zanten

commit sha a96ce53208b136506bdcc77427b0c33f378897d2

New Crowdin updates (#8075) * New translations en-US.yaml (Persian) * Add Persian (fa-IR)

view details

Nitwel

commit sha 2fe85b519bc6d6d8b78ee784a7a3154648657327

Fix app crashing (#8076) * fix app not being able to access shared store * fix imports

view details

Nitwel

commit sha f3f7e883df235f5c20d396b78a311fe11f311228

make i18n shared (#8078)

view details

Azri Kahar

commit sha 6405db831bb6f71e35c5303f0c615395ff0d0d7a

Make default values have consistent formatting (#8067)

view details

Nicola Krumschmidt

commit sha 306c4d261175bd320f0fbe4f3721eff945d008a5

Move useCollection calls out of computed (#8081)

view details

Rijk van Zanten

commit sha e7821f211a10b35d24f789b436aeae5595f1997f

New translations en-US.yaml (Persian) (#8077)

view details

Chris Bartley

commit sha 6148259beb2f34516b1049abd8bf9729772b2232

Fixed readByQuery's sort parameter in custom API endpoint example (see https://github.com/directus/directus/discussions/7867) (#8088)

view details

Rijk van Zanten

commit sha 213c5ddae04756b0d26fc88af97ec30f28f5c8c2

Fix saving issue on invalid conditional rule (#8091) Fixes #8083

view details

Rijk van Zanten

commit sha abdabe2437dbe1a82520730627683e82190861d5

New translations en-US.yaml (Czech) (#8089)

view details

rijkvanzanten

commit sha 7163e7390047a4f90c69bb976f9559bc5b062336

Tweak translations to fit big data

view details

Rijk van Zanten

commit sha f174ee0a45b4aafff9662b15fa152886bff526d6

New translations en-US.yaml (Czech) (#8092)

view details

rijkvanzanten

commit sha 61a368523b1fc4968ca456a610bc7de10be46dc1

v9.0.0-rc.93

view details

Rijk van Zanten

commit sha 9967274ab276a4adfe4a76b775b614cf940dcb27

Update changelog.md

view details

push time in 2 days

delete branch azrikahar/directus

delete branch : doc-default-value-format

delete time in 2 days

PR opened directus/directus

Reviewers
Display error when image exceeds `ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION` limit

Fixes #7996

Reported Bug

When an image exceeds the configured ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION env variable limit, the image src will break. However we can still view it by clicking zoom:

qwNo9Fv0pa

Solution

call the asset api and catch the error if the code is ILLEGAL_ASSET_TRANSFORMATION, then diplay an info icon with a message.

After Fix

yldCawqCIv

Uncertainty

calling the assets API and trigger it in the same try/catch might feel hacky.. but in a weird way it sort of makes sense? still likely that I'm reaching for a quick fix too soon, so do let me know if there's a more appropriate approach.

the error message is also not set in stone. I just referred it from the existing error message from the api:

https://github.com/directus/directus/blob/9ba43c19f8c7ae4add0394ace7f90cbc524177e7/api/src/services/assets.ts#L95-L97

+40 -2

0 comment

2 changed files

pr created time in 2 days

create barnchazrikahar/directus

branch : issue-7996

created branch time in 2 days

PR opened directus/directus

Make default values have consistent formatting

Minor change to add format consistency to default values. Just so it's easier to distinguish value (encased in ``) vs additional annotations, just like here:

chrome_cZLBfOwkPL

+22 -22

0 comment

1 changed file

pr created time in 3 days

create barnchazrikahar/directus

branch : doc-default-value-format

created branch time in 3 days

PR opened directus/directus

Fix revision drawer for create events

Fixes #7933

Reported bug

Two parts of the issue are:

  • The UI still shows Item Revision title for creation events.

    chrome_2EXlOCZMEC

  • The Updates Made tab for creation event is empty.

    chrome_D4ijjccuZ4

Proposed changes

  • Added computed value for title to show Item Creation for revision wih create action.
  • Regarding item creation revision not showing any update, I opted to just hide the Updates Made tab since there is indeed no changes to be shown, plus Creation Preview already shows the initial value set (which was the enhancement wanted in the issue).
  • Added necessary translation keys.

After fix

chrome_kvTcVTjG1H

+33 -15

0 comment

3 changed files

pr created time in 3 days