Explorer file form never clears "Loading…" for non-previewable file types (e.g. .docx); size and created read fields the entity lacks
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
Start in packages/Angular/Explorer/core-entity-forms/src/lib/custom/Files/file-form.component.ts and file-form.component.html, tracing LoadMediaPreview, OnMediaElementLoaded, and the default preview branch. Reproduce with a non-previewable .docx, then verify the loading overlay clears and the size and created reads use fields present on the MJ: Files entity.
Written by the indexing model from the issue text.
Description
Where: packages/Angular/Explorer/core-entity-forms/src/lib/custom/Files/file-form.component.{ts,html} on next at 54966974e7.
What happens. Open an MJ: Files record whose type is not an image, PDF, video, audio or text file (a .docx, for example). The stage shows "Loading name…" and never stops. The fallback card with its Open in Browser button is rendered underneath, but the loading overlay stays on top of it. Open in New Tab in the header works, so the stream URL was fetched fine.
Why. The overlay is shown while IsLoadingMedia || !IsMediaLoaded (file-form.component.html:45). LoadMediaPreview sets IsMediaLoaded = true only in the text branch (.ts:154), when there is no URL (.ts:157) or on an error (.ts:161). Images, PDFs, video and audio set it from their element's (load) event through OnMediaElementLoaded (.ts:168). The @default branch (.html:110) has no element that loads, so for any other type with a URL nothing ever sets IsMediaLoaded.
Fix. After the URL is fetched, set IsMediaLoaded = true whenever MediaType is neither a media element type nor text, i.e. for other.
Two cosmetic reads on the same form. The size badge and the sidebar read record.ContentLength (.html:13, :114, :156) and show "0 B"; the sidebar reads record.CreatedAt (.html:166) and shows nothing. The MJ: Files entity has neither field: there is no size column, and created is __mj_CreatedAt.
Seen on 6.2.0-edge with a Collaboration space upload (a 6.5 KB .docx stored as application/octet-stream); the bytes were intact and the media-stream download worked.
- Dominant language
- TSQL
- Stars
- 32
- Forks
- 7
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 677
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MemberJunction/MJ
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MemberJunction/MJ#5864 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
MemberJunction/MJ#5859 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MemberJunction/MJ#5837 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
MemberJunction/MJ#5836 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MemberJunction/MJ#5832 ·
Maintainers usually reply within 1 day
All issues in MemberJunction/MJ
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
maproulette/maproulette-frontend#2944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jaegertracing/jaeger-ui#4618 ·
Maintainers usually reply within 1 day
-
pending close triaging
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
anomalyco/opencode#56765 · 1 comment ·
Maintainers usually reply within 1 day
-
area:plugins enhancement platform:vscode
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
anthropics/claude-code#103166 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day