Skip to content

Conversation

@milanmajchrak
Copy link
Collaborator

@milanmajchrak milanmajchrak commented Jun 4, 2025

Phases MP MM MB MR JM Total
ETA 0 0 0 0 0 0
Developing 0 0 0 0 0 0
Review 0 0 0 0 0 0
Total - - - - - 0
ETA est. 0
ETA cust. - - - - - 0

Problem description

Check the issue.

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of filenames with spaces and query parameters in URLs to ensure filenames are correctly encoded and query parameters are preserved.

…ed in the URL, because that query part of the URL was encoded as the filename.
@coderabbitai
Copy link

coderabbitai bot commented Jun 4, 2025

Walkthrough

The parse method in BitstreamUrlSerializer was updated to correctly handle URLs with query parameters, ensuring that only the filename segment is percent-encoded and that query parameters remain intact. A new test case was added to verify this behavior, focusing on filenames with spaces and the preservation of query parameters.

Changes

File(s) Change Summary
src/app/core/url-serializer/bitstream-url-serializer.ts Updated parse method to split URL at '?', encode only the filename, and preserve query parameters.
src/app/core/url-serializer/bitstream-url-serializer.spec.ts Added a test to verify correct filename encoding and query parameter preservation in /bitstream/ URLs.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant BitstreamUrlSerializer
    participant DefaultUrlSerializer

    Client->>BitstreamUrlSerializer: parse(url)
    BitstreamUrlSerializer->>BitstreamUrlSerializer: Split url at '?'
    BitstreamUrlSerializer->>BitstreamUrlSerializer: Encode filename segment
    BitstreamUrlSerializer->>BitstreamUrlSerializer: Reconstruct url with encoded filename + original query
    BitstreamUrlSerializer->>DefaultUrlSerializer: parse(reconstructed url)
    DefaultUrlSerializer-->>BitstreamUrlSerializer: UrlTree
    BitstreamUrlSerializer-->>Client: UrlTree
Loading

Possibly related PRs

  • UFAL/Copy bitstream encoding name #851: Introduced the initial implementation of the parse method in BitstreamUrlSerializer and related tests, which this PR directly extends to handle query parameters.

Poem

🐇
A filename with spaces, a query in tow,
The serializer works, encoding just so.
Spaces to %20, the query kept neat,
URLs now parsed, a technical feat!
Hopping through code, I nibble with glee—
Another bug fixed, from confusion set free!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

yarn install v1.22.22
[1/4] Resolving packages...
(node:20740) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities.
(Use node --trace-deprecation ... to show where the warning was created)
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^14 || ^16 || ^17 || ^18 || ^19". Got "24.1.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adf59d5 and c680347.

📒 Files selected for processing (2)
  • src/app/core/url-serializer/bitstream-url-serializer.spec.ts (1 hunks)
  • src/app/core/url-serializer/bitstream-url-serializer.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/app/core/url-serializer/bitstream-url-serializer.ts (1)
src/app/shared/clarin-shared-util.ts (1)
  • encodeRFC3986URIComponent (96-102)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: tests (16.x)
  • GitHub Check: tests (18.x)
  • GitHub Check: dspace-angular / docker-build (linux/amd64, ubuntu-latest, true)
🔇 Additional comments (5)
src/app/core/url-serializer/bitstream-url-serializer.ts (4)

15-16: LGTM: Proper separation of path and query components.

The destructuring assignment correctly splits the URL at the first '?' character, which is the standard separator between path and query string in URLs. The split('?') method only splits on the first occurrence, which is the correct behavior for URL parsing.


19-19: LGTM: Correctly processes only the path component.

This change ensures that only the path portion is split for filename processing, preventing query parameters from being included in the filename encoding logic.


21-21: LGTM: Proper filename reconstruction with forward slashes.

The change from joining with commas to joining with forward slashes is correct for file path reconstruction. This properly handles nested directory structures in filenames within the bitstream URL path.


24-28: LGTM: Clean path reconstruction and query string handling.

The implementation correctly:

  • Uses spread syntax for clean array concatenation
  • Reconstructs the path with the encoded filename
  • Properly handles both cases (with and without query parameters) using a ternary operator
  • Preserves the original query string without modification
src/app/core/url-serializer/bitstream-url-serializer.spec.ts (1)

44-53: LGTM: Comprehensive test for the query parameter fix.

This test case effectively validates the core fix by:

  • Testing a filename with spaces that requires encoding (some file.pdfsome%20file.pdf)
  • Including query parameters that should be preserved unchanged
  • Verifying the complete round-trip parsing and serialization process
  • Following the established testing pattern in the file

The test adequately covers the main use case that was problematic before the fix.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@milanmajchrak milanmajchrak requested a review from Copilot June 4, 2025 12:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses improper URL encoding for filenames within bitstream URLs, ensuring that filenames with spaces and query parameters are correctly handled.

  • Separates the URL's path and query string
  • Encodes the filename with improved reconstruction of the URL
  • Adds tests verifying the expected behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/app/core/url-serializer/bitstream-url-serializer.ts Updates URL parsing to separate the query string and properly encode the filename
src/app/core/url-serializer/bitstream-url-serializer.spec.ts Adds tests ensuring filenames with spaces and query parameters are encoded correctly
Comments suppressed due to low confidence (2)

src/app/core/url-serializer/bitstream-url-serializer.ts:19

  • [nitpick] Consider renaming 'parts' to 'pathSegments' to improve clarity about its contents.
const parts = path.split('/');

src/app/core/url-serializer/bitstream-url-serializer.ts:20

  • [nitpick] Consider adding a brief comment to clarify the expected value of 'this.FILENAME_INDEX' for improved maintainability.
if (parts.length > this.FILENAME_INDEX) {

@milanmajchrak milanmajchrak requested a review from vidiecan June 6, 2025 07:17
@milanmajchrak milanmajchrak merged commit cc18e5f into dtq-dev Jun 9, 2025
6 checks passed
milanmajchrak added a commit that referenced this pull request Jul 10, 2025
* Removed dynamic overflow because every content must be scrollable.. (#716)

* add tar for preview (#713)

* add tar for preview

* UFAL/Enhanced type-bind feature (#714)

* The type-bind is loaded from the cfg and correctly rendered

* Done some refactoring

* Update tests following the type-bind enhancement

* Fixed linting error.

* Removed unwanted changes and fixed wrong refactored code.

* Updated error message when tests failed

* Update README.md

* UFAL/Show sesznam license on approval page (#722)

* Added static files from the SEZNAM license.

* Refactored fetching html content from the static files. The logic was moved into the common service.

* Show Seznam static license on approval page.

* Updated constant name LICENSE_NAME_SEZNAM - added the _CZ to make it more clear that is Czech license

* UFAL/share submission by email (#720)

* Added share submission button into workspaceitem actions page.

* Added notification about the success of the sharing the submission.

* Created share submission module, page with routing. That page could access only the administrator.

* WIP - created a new page `change-submitter-page`.

* Created page when the user could take the workspace item as its own.

* Pretified the code and added some docs

* Updated tests following the new feature

* Fixed unwanted changes, updated docs

* UFAL/Autocomplete enhancement (#718)

* Added support for searching results from specific solr indexes.

Updated autocomplete component to search values from custom solr index. The autocomplete component could have attribute for resolving the custom index from the submission-forms definition.

* Show suggestions for `solr-handle_title_ac` and `solr-subject_ac`

* Fixed tests

* Formatted language suggestions, added docs and fixed tests.

* Refactored the code following the review requirements.

* Fixed type in the word pretify

* UFAL/License page - wrong layout in Firefox (#721)

* Removed flex class and used width style instead of col

* Removed unsued class

* Changed style in the html into classes

* Migrated Vanilla cs messages into clarin 7.6.1. cs messages (#669)

* Migrated Vanilla cs messages into clarin 7.6.1. cs messages

* updated translation

* Updated cs localization for subcommunities and subcollections

* Changed `prispeveku` to `prispevku`

* Updated messages for the 'supervised' and 'claim' sentenses

---------

Co-authored-by: Ondrej Kosarko <[email protected]>

* UFAL/Share submission with user not only admin (#728)

* The submitter information cannot be displayed in some cases, but show a few information about the Item

* Added missing trailing comma

* Fixed docs

* Updated messages following last commit to upstream. (#731)

* Updated dspace prefix to lindat (#734)

* Added notification when the shibboleth authentication is failed (#732)

* Removed two IT: (#737)

1. Author does not have a two input fields.
2. Test for checking the notice step will be transformed into UI test, because we do not want to keep such specific collection for generic IT.

* Update all static licenses (#726)

* added licenses from ufal commit dcbe87e02931dee78b13c4b3995a6cef3aeacd32

* added missing static licenses

* remove static from licenses path

* no_static_ as const

* checkstyle

* Use NAMESPACES from the .env (#727)

* Use NAMESPACES from the .env

* Created symbolic link for the tomcat folder

* Updated docker compose files - can load more properties from the `.env`

* Update deploy.yml to increase timeout (#738)

Because some tests were canceled during processing.

* Use only 4000, not the {UI_PORT} from the .env because in the container it is always 4000 (#740)

* Update docker-compose-rest.yml

Uncommented /repository/ namespace in the docker-compose.yml.
It is only for one deploy.

* Update docker-compose-rest.yml

Undo exposing server on the /repository/ path

* Use only / and /server namespaces, not the values from the .env because in the container it is always `/` and `/server` (#741)

* Expose tomcat `/server` on `/repository/server`

* Take a customized docker-compose-rest.yml which exposes the server on /repository/server

* Updated a path to take right docker-compose files

* Undo using only default namespaced `/` and `/server`

* Use custom `docker-compose.yml` from the testing server

* UFAL/Shibboleth fixed wrong redirect after login with verification token (#733)

* Used hardredirect instead of the standard router.redirect because the user could be stucked on the loading page

* Added doc why

* Added missing whitespace

* Use path `./assets` instead of `/assets` (#742)

* new download instruction for cmd using zip from backend (#739)

* Get UI base URL from BE (#744)

* Check that the custom type bind field in configured in the `submission-forms` when it is configured in the cfg property (#745)

* Searching by type is changed to 'type' instead of 'itemtype' because it was changed in the autocomplete enhnancement (#749)

* Use `autoLogin` method (#747)

* UFAL/Matomo statistics using angulartics2 (#748)

* Modified matomo tracking in footer component

* Do not use routerless Matomo because we want to track view on every page redirect

* The Matomo statistics are tracked properly.

* Prettyfied the code

* Fix linting error

* Fixed unit tests following the matomo statistics update

* Fixed linting error

* Added a document title in the footer

* Added category to the eventTrack because it is required for the Matomo.

* Refactored using matomo statistics - added into browser init service, because the Matomo statistics wasn't rendered on production

* Changed matomo-settings location

---------

Co-authored-by: Matus Kasak <[email protected]>

* Update db-import action

Try a commit when the import worked.

* Update import-db action - use main branch

* Added a translation for the searching filter `subjectFirstValue` (redirect from home page). (#752)

* Ensure the redirect URL starts with a slash (#753)

* Added volume into docker-compose (#754)

* UFAL/Load the matomo configuration from the environment (#755)

* Added volume into docker-compose

* Take a matomo configuration from the environment

* Fetch the matomo properties from the config, not from the environment (#756)

* Load the szn license in oninit method (#757)

* UFAL/Temporary fix for the type-bind. The form automatically refreshes after the type is changed. (#761)

* The Save action is automatically dispatched when the type is changed

* Updated the handleFormSave method name to `dispatchFormSaveAndReinitialize`

* Added missing function to mock object

* Execute autoregistration component only in client side (#762)

* The Autocomplete Component is dynamically loaded as a standalone component only in the browser using the Loader component. (#763)

* UFAL/footer header images (#760)

* Footer images upload to assets/images/footer/ and change of images src attributes

* Changed src paths to start with ./

---------

Co-authored-by: Juraj Roka <[email protected]>

* ufal/customize the footer (#759)

* Footer details update by Lindat live instance's footer

* Copied UI tests fix from the dtq-dev

---------

Co-authored-by: Juraj Roka <[email protected]>
Co-authored-by: milanmajchrak <[email protected]>

* Copied fixes from the lindat branch (#770)

* Copied PR 769

* Used root URL to compose download URL with namespace (#768)

* Cherry-picked docker compose rest

* The dtq-dev is run on /repository branch

* Waiting for the http://dev-5.pc:8$INSTANCE/server/api changed to http://dev-5.pc:8$INSTANCE/repository/server/api

* Added `repository` namespace to discojuice

* Run UI integration tests every hour

* Update actions/upload-artifact@v3 to v4

Because it was deprecated and UI tests cannot be run

* Run build CRON every 4 hours

* Update deploy.yml - changed runner

* Update deploy.yml - updated runner everywhere

* Update deploy.yml - use `dspace-dep-1` runner again

* Fixed failing Integration tests (#773)

* Commented out sometimes failing accessibility tests and added wait method to the submission ui test

* Cherry picked fix for unique artifact name.

---------

Co-authored-by: Tim Donohue <[email protected]>

* Update import action.yml - use `/repository` namespace in the import action

* Merge pull request DSpace#2694 from hutattedonmyarm/dspace-7_x (#777)

[Port dspace-7_x]  Enable type-bind for checkbox inputs during submission

Co-authored-by: Tim Donohue <[email protected]>

* Update build.yml - added a option to manually run build action

* save logs

* missing $

* print log file name for check

* removed superfluous space

* renamed log file -> added 'log' at the end of the name

* Ufal/License issues (#779)

* Fixed pagination when searching licenses by the name.

* Fixed Editing license: 1. wrong checked checkboxes for the required info and extended license labels and removed errors from the console.

* Update action.yml - defined log_file

* Update action.yml - log import into a specific path

* Update action.yml - continuously copy logs from the import into another file

* Update action.yml - import logging - show path info

* Update action.yml - log import - copy logs after they are created

* Update action.yml - Start appending when the first file is added to the __logs folder

* Added a new workflow which runs a build workflow in every customer

* Fixed copying of the import logs to the dev machine (#786)

* The copying of the import logs are not creating a new `tail` job every 2s

* Call the import every week (#787)

* UFAL/Use namespace in the redirect URL (#794)

* Use current activated route as a parameter to the `createUrlTree` to compose correct redirect url (#796)

* UFAL/Fixed CMD download command - added name (#798)

* UFAL/Fixed editing the license - required info is removed/added following the checked checkbox

Co-authored-by: Juraj Roka <[email protected]>

* UFAL/Copy the refbox content correctly (#801)

* Copy the refbox content correctly

* Added missing parts of the modal

* UFAL/The current version redirect - get the base href using the DOCUMENT (#800)

* Get the base href using the DOCUMENT

* UFAL/Start the handle server before tomca

* Sync with ufal main (#799)

* Merge pull request #7 from uib-ub/fix-warnings

Address warnings in dockerfiles and composer files

* Show resource id (not handle id) in manage handles (ufal#22)

* show the resourceId in handle-table

* show the resourceId and handle id in edit-handle

---------

Co-authored-by: Marvin <[email protected]>

* use i18n

---------

Co-authored-by: Marvin <[email protected]>

* UFAL/Edit item - fixed license redirect

Co-authored-by: Juraj Roka <[email protected]>

* Add custom dimension (handle) to pageTrack of matomo (#823)

* Add custom dimension (handle) to pageTrack of matomo

This extends/overrides the pageTrack/eventTrack methods of angulartics
matomo plugin and hooks into the event tracking (view-tracker.component)
that's there for DSpace internal statistics.

* Fix linting issues and PR review comments

* Fix tests - misconfigured test env

* UFAL/Change menu options redirects (#816)

* Change menu options redirects

* Fix some menu options redirects by Coderabbit's nitpick comments

* Adding cs/en by current language and translating slugs in About-menu

* Unit tests - Edit of component.spec file

* Typos in comments

* UFAL/Preview - fixed loading files (#825)

* Show loading icon when loading the files with a asking to contant the administrator when it took so long

* The (listOfFiles | async) could be null add a `?` check after it.

* UFAL/Handle table issues - Fixed table responsivity and searching (#822)

* Fixed table responsivity and searching

* Move `table-responsive` to div because it ensures more consistent responsiveness across browsers

* Use `combineLatest` because it is more common for RxJS, refactor if condition

* UFAL/Redirect to `/lindat` after clicking on the Lindat icon in the home page (#828)

* Redirect to `/lindat` after clicking on the Lindat icon in the home page

* Update deploy.yml - use correct deploy action for the weekly import

* UFAL/Menu options links edit (#832)

* Changed the getLangCodeIfCzech links

* Changed the dropdown-menu and services links

* Ufal dtq sync (#836)

* Creating docker-compose file useful for building clarin-dspace on MAC computers

(cherry picked from commit 7de4761)

* Add link to communities and collections on home page

(cherry picked from commit 4673e39)

---------

Co-authored-by: Milan Kuchtiak <[email protected]>

* UFAL/Updated the no file preview message and refactored some code (#837)

* Updated the no file preview message and refactored some code.

* Added a non null check when accessing the object properties and the message is refactored.

* Run Python import weekly

* UFAL/Added spacing between clarin & dspace logo (#848)

* Added spacing between clarin & dspace logo

* Spacing is prettier and when clarin logo is removed, dspace logo is centered

* Ufal/seznam license request (#844)

* Fix of unwanted Seznam Dataset License request while using other licenses

* ZCU-PUB/Fixed encoding of the filename from the URL (#838) (#851)

* Added an URL serializer to fix encoding of the special characters from the URL e.g., `[`, `(` because the filename wasn't properly parsed

* Added some unit tests for encoding the bitstream filename url

* UFAL/Do not mount the Solr configs; copy them each time instead. (#850)

* UFAL/Fix the bulk access (#852)

* Do not use the clarin item view box for the bulk access

* Removed unused import

* Clarify the `showClarinViewBox` is boolean

* Use the constant for the hardcoded bulk access list id

* Ufal dtq sync 2025 05 14 (#855)

* Create Acknowledgment-ReadMe.md

Acnkowledgment of NRP project

(cherry picked from commit ad889b2)

* Video files previews

This uses the thumbnail as poster (if available) and correctly sets the
source of the video

currently only works for anonymously accessible files.

(cherry picked from commit 4832c2f)

* Handle video previews for restricted items

append a shortlived token at the right time (error, seeking, stalled)

(cherry picked from commit 2c12d7d)

* Display only ORIGINAL bitstreams

Thumbnails, when available, should be shown istead of the generic
MIME_TYPE_IMAGE.

Content of the TEXT bundle should not be shown at all this is usually
automatically extracted "text layer" of a PDF, useful for indexing, but
don't want people downloading it.

(cherry picked from commit 3862442)

* fix linter and test errors

(cherry picked from commit f852096)

* Code review follow up

the listOfFiles should really not contain files from "TEXT" or
"THUMBNAIL" bundles.

* code review

unsubscribe error$, seeking$ and $stalled

* code review - thumbnail might be undefined

* code review - consistent formatting

* UFAL/Do not add `dtoken` into the URL if it is null (#860) (#861)

* UFAL/Added same spacing styles via bootstrap as in login page (#862)

* UFAL/Fixed editing of extended license labels

* UFAL/License agreement page component errors (#867)

* Design fix - added spaces between links

* Fix of firstMedataValue null properties

* UFAL/Ask Only Once license not downloading bitstream without page reload after agreeing (#874)

* Changed logic (condition) of retrieving file download link

* Saved the original logic, but changed caching parameter

* The filename wasn't properly encoded when it has ?sequence...&isAllowed in the URL, because that query part of the URL was encoded as the filename. (#873)

* UI tests for each customer (#865)

* Playright after deploy running here

* Using different token

* Corrected path in copying json file

* Checkout only branch in UI tests not master

* Added copilot changes

---------

Co-authored-by: Matus Kasak <[email protected]>

* Ufal dtq sync062025 (#877)

* use `$DSPACE_REST_NAMESPACE` for the webapps symlink

(cherry picked from commit 9ea936e)

* Licenses sync

(cherry picked from commit 4ee2f1c)

* update header/footer

based on latest lindat-common 3.5.0

(cherry picked from commit 7b2f299)

* expose both tcp & udp ports of the handle server

(cherry picked from commit 46bc936)

* Update docker-compose-rest.yml

replace ../webapps with /usr/local/tomcat/webapps

---------

Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>

* UFAL/License Administration Labels & Required Info checkboxes should work properly (#881)

* hotfix - finding index of unchecked box properly to formName arg

* UFAL/Searching problems in Manage Handles table (#882)

* locked searchbar when searchOption is not picked

* edited Resource Type search option to not be case-sensitive

* edited Resource Type search option to show nothing when there is no match

* try to set lowercase constants without toLowerCase method

* Added full list of handles for empty Resource Type search option

* refactored empty searchQueries handling and added comment for invalid resourcetype search inputs

* Updating UI tests after import (#887)

Co-authored-by: Matus Kasak <[email protected]>

* UFAL/Show openaire input field every time the EU funding type is selected (#897)

* Show openaire input field every time the EU type is selected

* UFAL/Publisher search redirect not work #880 (#904)

Co-authored-by: milanmajchrak <[email protected]>

* Ufal/commits from ok lindat (#903)

* copied static content

that was not already in cs/.

Otherwise license page (when without .html) might show an error when UI
is in Czech and there's no translation.

(cherry picked from commit 9e7eea0)

* Update header.component.html

I'm expecting the image to take me to lindat.cz. There's no other obvious way to navigate out of the repository

* This is the change from ufal/clarin-dspace@5fc2414

but applied on v7

* Adding a note about the proprietor change

---------

Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Michal Kren <[email protected]>

* UFAL/show-no-spinner-when-item-has-no-files (#902)

* show msg about no files when item has no files, show no spinenr

* check if files are array

* check files size

* fix error

* optimize template with hasNoFiles flag

* used behaviourSubject for hasNoFiles / aynchronous

* Trigger automated ui tests (#905)

* Created trigger for running UI tests for each customer daily

* Corrected spaces

* Changed name of the tests

---------

Co-authored-by: Matus Kasak <[email protected]>

* UFAL/License agreement loading spinner after submitting (#892)

* Added loading spinner icon after 'I agree' button is clicked

* Removed type annotation and rephrased comment

* Changes isLoading to async object

* Edited loading spinner visibility method - consistency fix

* UFAL/User cannot see his submission (#910)

* The user always see it's submissions page

---------

Co-authored-by: Paurikova2 <[email protected]>

---------

Co-authored-by: Paurikova2 <[email protected]>
Co-authored-by: Jozef Misutka <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Matus Kasak <[email protected]>
Co-authored-by: jurinecko <[email protected]>
Co-authored-by: Juraj Roka <[email protected]>
Co-authored-by: Tim Donohue <[email protected]>
Co-authored-by: Paurikova2 <[email protected]>
Co-authored-by: Ondřej Košarko <[email protected]>
Co-authored-by: Marvin <[email protected]>
Co-authored-by: Milan Kuchtiak <[email protected]>
Co-authored-by: Kasinhou <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Michal Kren <[email protected]>
kosarko added a commit to ufal/dspace-angular that referenced this pull request Jul 14, 2025
dataquest-dev/dtq-dev sync

syncing dtq-dev ~lindat-2025.07.16198085191:

UFAL/Added same spacing styles via bootstrap as in login page (dataquest-dev#862)
UFAL/Fixed editing of extended license labels
UFAL/License agreement page component errors (dataquest-dev#867)
UFAL/Ask Only Once license not downloading bitstream without page reload after agreeing (dataquest-dev#874)
UFAL/License Administration Labels & Required Info checkboxes should work properly (dataquest-dev#881)
UFAL/Searching problems in Manage Handles table (dataquest-dev#882)
UFAL/License agreement loading spinner after submitting (dataquest-dev#892)                                                                                                                                                                                    
UI tests for each customer (dataquest-dev#865)
Updating UI tests after import (dataquest-dev#887)
Trigger automated ui tests (dataquest-dev#905)
Changed runner in playwright tests (dataquest-dev#914)
                                                                                                                                                                                                                                                                              UFAL/Publisher search redirect not work dataquest-dev#880 (dataquest-dev#904)
Ufal/commits from ok lindat (dataquest-dev#903)
UFAL/show-no-spinner-when-item-has-no-files (dataquest-dev#902)

The filename wasn't properly encoded when it has ?sequence...&isAllowed in the URL, because that query part of the URL was encoded as the filename. (dataquest-dev#873)
UFAL/Show openaire input field every time the EU funding type is selected (dataquest-dev#897)
UFAL/User cannot see his submission (dataquest-dev#910)
                                                                                                                                                                                                                                                                              Merge commit 'c15d94c1c' into HEAD
Merge remote-tracking branch 'dataquest-dev/dtq-dev' into HEAD

Ufal dtq sync062025 (dataquest-dev#877)
milanmajchrak added a commit that referenced this pull request Jul 24, 2025
* Removed dynamic overflow because every content must be scrollable.. (#716)

* add tar for preview (#713)

* add tar for preview

* UFAL/Enhanced type-bind feature (#714)

* The type-bind is loaded from the cfg and correctly rendered

* Done some refactoring

* Update tests following the type-bind enhancement

* Fixed linting error.

* Removed unwanted changes and fixed wrong refactored code.

* Updated error message when tests failed

* Update README.md

* UFAL/Show sesznam license on approval page (#722)

* Added static files from the SEZNAM license.

* Refactored fetching html content from the static files. The logic was moved into the common service.

* Show Seznam static license on approval page.

* Updated constant name LICENSE_NAME_SEZNAM - added the _CZ to make it more clear that is Czech license

* UFAL/share submission by email (#720)

* Added share submission button into workspaceitem actions page.

* Added notification about the success of the sharing the submission.

* Created share submission module, page with routing. That page could access only the administrator.

* WIP - created a new page `change-submitter-page`.

* Created page when the user could take the workspace item as its own.

* Pretified the code and added some docs

* Updated tests following the new feature

* Fixed unwanted changes, updated docs

* UFAL/Autocomplete enhancement (#718)

* Added support for searching results from specific solr indexes.

Updated autocomplete component to search values from custom solr index. The autocomplete component could have attribute for resolving the custom index from the submission-forms definition.

* Show suggestions for `solr-handle_title_ac` and `solr-subject_ac`

* Fixed tests

* Formatted language suggestions, added docs and fixed tests.

* Refactored the code following the review requirements.

* Fixed type in the word pretify

* UFAL/License page - wrong layout in Firefox (#721)

* Removed flex class and used width style instead of col

* Removed unsued class

* Changed style in the html into classes

* Migrated Vanilla cs messages into clarin 7.6.1. cs messages (#669)

* Migrated Vanilla cs messages into clarin 7.6.1. cs messages

* updated translation

* Updated cs localization for subcommunities and subcollections

* Changed `prispeveku` to `prispevku`

* Updated messages for the 'supervised' and 'claim' sentenses

---------

Co-authored-by: Ondrej Kosarko <[email protected]>

* UFAL/Share submission with user not only admin (#728)

* The submitter information cannot be displayed in some cases, but show a few information about the Item

* Added missing trailing comma

* Fixed docs

* Updated messages following last commit to upstream. (#731)

* Updated dspace prefix to lindat (#734)

* Added notification when the shibboleth authentication is failed (#732)

* Removed two IT: (#737)

1. Author does not have a two input fields.
2. Test for checking the notice step will be transformed into UI test, because we do not want to keep such specific collection for generic IT.

* Update all static licenses (#726)

* added licenses from ufal commit dcbe87e02931dee78b13c4b3995a6cef3aeacd32

* added missing static licenses

* remove static from licenses path

* no_static_ as const

* checkstyle

* Use NAMESPACES from the .env (#727)

* Use NAMESPACES from the .env

* Created symbolic link for the tomcat folder

* Updated docker compose files - can load more properties from the `.env`

* Update deploy.yml to increase timeout (#738)

Because some tests were canceled during processing.

* Use only 4000, not the {UI_PORT} from the .env because in the container it is always 4000 (#740)

* Update docker-compose-rest.yml

Uncommented /repository/ namespace in the docker-compose.yml.
It is only for one deploy.

* Update docker-compose-rest.yml

Undo exposing server on the /repository/ path

* Use only / and /server namespaces, not the values from the .env because in the container it is always `/` and `/server` (#741)

* Expose tomcat `/server` on `/repository/server`

* Take a customized docker-compose-rest.yml which exposes the server on /repository/server

* Updated a path to take right docker-compose files

* Undo using only default namespaced `/` and `/server`

* Use custom `docker-compose.yml` from the testing server

* UFAL/Shibboleth fixed wrong redirect after login with verification token (#733)

* Used hardredirect instead of the standard router.redirect because the user could be stucked on the loading page

* Added doc why

* Added missing whitespace

* Use path `./assets` instead of `/assets` (#742)

* new download instruction for cmd using zip from backend (#739)

* Get UI base URL from BE (#744)

* Check that the custom type bind field in configured in the `submission-forms` when it is configured in the cfg property (#745)

* Searching by type is changed to 'type' instead of 'itemtype' because it was changed in the autocomplete enhnancement (#749)

* Use `autoLogin` method (#747)

* UFAL/Matomo statistics using angulartics2 (#748)

* Modified matomo tracking in footer component

* Do not use routerless Matomo because we want to track view on every page redirect

* The Matomo statistics are tracked properly.

* Prettyfied the code

* Fix linting error

* Fixed unit tests following the matomo statistics update

* Fixed linting error

* Added a document title in the footer

* Added category to the eventTrack because it is required for the Matomo.

* Refactored using matomo statistics - added into browser init service, because the Matomo statistics wasn't rendered on production

* Changed matomo-settings location

---------

Co-authored-by: Matus Kasak <[email protected]>

* Update db-import action

Try a commit when the import worked.

* Update import-db action - use main branch

* Added a translation for the searching filter `subjectFirstValue` (redirect from home page). (#752)

* Ensure the redirect URL starts with a slash (#753)

* Added volume into docker-compose (#754)

* UFAL/Load the matomo configuration from the environment (#755)

* Added volume into docker-compose

* Take a matomo configuration from the environment

* Fetch the matomo properties from the config, not from the environment (#756)

* Load the szn license in oninit method (#757)

* UFAL/Temporary fix for the type-bind. The form automatically refreshes after the type is changed. (#761)

* The Save action is automatically dispatched when the type is changed

* Updated the handleFormSave method name to `dispatchFormSaveAndReinitialize`

* Added missing function to mock object

* Execute autoregistration component only in client side (#762)

* The Autocomplete Component is dynamically loaded as a standalone component only in the browser using the Loader component. (#763)

* UFAL/footer header images (#760)

* Footer images upload to assets/images/footer/ and change of images src attributes

* Changed src paths to start with ./

---------

Co-authored-by: Juraj Roka <[email protected]>

* ufal/customize the footer (#759)

* Footer details update by Lindat live instance's footer

* Copied UI tests fix from the dtq-dev

---------

Co-authored-by: Juraj Roka <[email protected]>
Co-authored-by: milanmajchrak <[email protected]>

* Copied fixes from the lindat branch (#770)

* Copied PR 769

* Used root URL to compose download URL with namespace (#768)

* Cherry-picked docker compose rest

* The dtq-dev is run on /repository branch

* Waiting for the http://dev-5.pc:8$INSTANCE/server/api changed to http://dev-5.pc:8$INSTANCE/repository/server/api

* Added `repository` namespace to discojuice

* Run UI integration tests every hour

* Update actions/upload-artifact@v3 to v4

Because it was deprecated and UI tests cannot be run

* Run build CRON every 4 hours

* Update deploy.yml - changed runner

* Update deploy.yml - updated runner everywhere

* Update deploy.yml - use `dspace-dep-1` runner again

* Fixed failing Integration tests (#773)

* Commented out sometimes failing accessibility tests and added wait method to the submission ui test

* Cherry picked fix for unique artifact name.

---------

Co-authored-by: Tim Donohue <[email protected]>

* Update import action.yml - use `/repository` namespace in the import action

* Merge pull request DSpace#2694 from hutattedonmyarm/dspace-7_x (#777)

[Port dspace-7_x]  Enable type-bind for checkbox inputs during submission

Co-authored-by: Tim Donohue <[email protected]>

* Update build.yml - added a option to manually run build action

* save logs

* missing $

* print log file name for check

* removed superfluous space

* renamed log file -> added 'log' at the end of the name

* Ufal/License issues (#779)

* Fixed pagination when searching licenses by the name.

* Fixed Editing license: 1. wrong checked checkboxes for the required info and extended license labels and removed errors from the console.

* Update action.yml - defined log_file

* Update action.yml - log import into a specific path

* Update action.yml - continuously copy logs from the import into another file

* Update action.yml - import logging - show path info

* Update action.yml - log import - copy logs after they are created

* Update action.yml - Start appending when the first file is added to the __logs folder

* Added a new workflow which runs a build workflow in every customer

* Fixed copying of the import logs to the dev machine (#786)

* The copying of the import logs are not creating a new `tail` job every 2s

* Call the import every week (#787)

* UFAL/Use namespace in the redirect URL (#794)

* Use current activated route as a parameter to the `createUrlTree` to compose correct redirect url (#796)

* UFAL/Fixed CMD download command - added name (#798)

* UFAL/Fixed editing the license - required info is removed/added following the checked checkbox

Co-authored-by: Juraj Roka <[email protected]>

* UFAL/Copy the refbox content correctly (#801)

* Copy the refbox content correctly

* Added missing parts of the modal

* UFAL/The current version redirect - get the base href using the DOCUMENT (#800)

* Get the base href using the DOCUMENT

* UFAL/Start the handle server before tomca

* Sync with ufal main (#799)

* Merge pull request #7 from uib-ub/fix-warnings

Address warnings in dockerfiles and composer files

* Show resource id (not handle id) in manage handles (ufal#22)

* show the resourceId in handle-table

* show the resourceId and handle id in edit-handle

---------

Co-authored-by: Marvin <[email protected]>

* use i18n

---------

Co-authored-by: Marvin <[email protected]>

* UFAL/Edit item - fixed license redirect

Co-authored-by: Juraj Roka <[email protected]>

* Add custom dimension (handle) to pageTrack of matomo (#823)

* Add custom dimension (handle) to pageTrack of matomo

This extends/overrides the pageTrack/eventTrack methods of angulartics
matomo plugin and hooks into the event tracking (view-tracker.component)
that's there for DSpace internal statistics.

* Fix linting issues and PR review comments

* Fix tests - misconfigured test env

* UFAL/Change menu options redirects (#816)

* Change menu options redirects

* Fix some menu options redirects by Coderabbit's nitpick comments

* Adding cs/en by current language and translating slugs in About-menu

* Unit tests - Edit of component.spec file

* Typos in comments

* UFAL/Preview - fixed loading files (#825)

* Show loading icon when loading the files with a asking to contant the administrator when it took so long

* The (listOfFiles | async) could be null add a `?` check after it.

* UFAL/Handle table issues - Fixed table responsivity and searching (#822)

* Fixed table responsivity and searching

* Move `table-responsive` to div because it ensures more consistent responsiveness across browsers

* Use `combineLatest` because it is more common for RxJS, refactor if condition

* UFAL/Redirect to `/lindat` after clicking on the Lindat icon in the home page (#828)

* Redirect to `/lindat` after clicking on the Lindat icon in the home page

* Update deploy.yml - use correct deploy action for the weekly import

* UFAL/Menu options links edit (#832)

* Changed the getLangCodeIfCzech links

* Changed the dropdown-menu and services links

* Ufal dtq sync (#836)

* Creating docker-compose file useful for building clarin-dspace on MAC computers

(cherry picked from commit 7de4761)

* Add link to communities and collections on home page

(cherry picked from commit 4673e39)

---------

Co-authored-by: Milan Kuchtiak <[email protected]>

* UFAL/Updated the no file preview message and refactored some code (#837)

* Updated the no file preview message and refactored some code.

* Added a non null check when accessing the object properties and the message is refactored.

* Run Python import weekly

* UFAL/Added spacing between clarin & dspace logo (#848)

* Added spacing between clarin & dspace logo

* Spacing is prettier and when clarin logo is removed, dspace logo is centered

* Ufal/seznam license request (#844)

* Fix of unwanted Seznam Dataset License request while using other licenses

* ZCU-PUB/Fixed encoding of the filename from the URL (#838) (#851)

* Added an URL serializer to fix encoding of the special characters from the URL e.g., `[`, `(` because the filename wasn't properly parsed

* Added some unit tests for encoding the bitstream filename url

* UFAL/Do not mount the Solr configs; copy them each time instead. (#850)

* UFAL/Fix the bulk access (#852)

* Do not use the clarin item view box for the bulk access

* Removed unused import

* Clarify the `showClarinViewBox` is boolean

* Use the constant for the hardcoded bulk access list id

* Ufal dtq sync 2025 05 14 (#855)

* Create Acknowledgment-ReadMe.md

Acnkowledgment of NRP project

(cherry picked from commit ad889b2)

* Video files previews

This uses the thumbnail as poster (if available) and correctly sets the
source of the video

currently only works for anonymously accessible files.

(cherry picked from commit 4832c2f)

* Handle video previews for restricted items

append a shortlived token at the right time (error, seeking, stalled)

(cherry picked from commit 2c12d7d)

* Display only ORIGINAL bitstreams

Thumbnails, when available, should be shown istead of the generic
MIME_TYPE_IMAGE.

Content of the TEXT bundle should not be shown at all this is usually
automatically extracted "text layer" of a PDF, useful for indexing, but
don't want people downloading it.

(cherry picked from commit 3862442)

* fix linter and test errors

(cherry picked from commit f852096)

* Code review follow up

the listOfFiles should really not contain files from "TEXT" or
"THUMBNAIL" bundles.

* code review

unsubscribe error$, seeking$ and $stalled

* code review - thumbnail might be undefined

* code review - consistent formatting

* UFAL/Do not add `dtoken` into the URL if it is null (#860) (#861)

* UFAL/Added same spacing styles via bootstrap as in login page (#862)

* UFAL/Fixed editing of extended license labels

* UFAL/License agreement page component errors (#867)

* Design fix - added spaces between links

* Fix of firstMedataValue null properties

* UFAL/Ask Only Once license not downloading bitstream without page reload after agreeing (#874)

* Changed logic (condition) of retrieving file download link

* Saved the original logic, but changed caching parameter

* The filename wasn't properly encoded when it has ?sequence...&isAllowed in the URL, because that query part of the URL was encoded as the filename. (#873)

* UI tests for each customer (#865)

* Playright after deploy running here

* Using different token

* Corrected path in copying json file

* Checkout only branch in UI tests not master

* Added copilot changes

---------

Co-authored-by: Matus Kasak <[email protected]>

* Ufal dtq sync062025 (#877)

* use `$DSPACE_REST_NAMESPACE` for the webapps symlink

(cherry picked from commit 9ea936e)

* Licenses sync

(cherry picked from commit 4ee2f1c)

* update header/footer

based on latest lindat-common 3.5.0

(cherry picked from commit 7b2f299)

* expose both tcp & udp ports of the handle server

(cherry picked from commit 46bc936)

* Update docker-compose-rest.yml

replace ../webapps with /usr/local/tomcat/webapps

---------

Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>

* UFAL/License Administration Labels & Required Info checkboxes should work properly (#881)

* hotfix - finding index of unchecked box properly to formName arg

* UFAL/Searching problems in Manage Handles table (#882)

* locked searchbar when searchOption is not picked

* edited Resource Type search option to not be case-sensitive

* edited Resource Type search option to show nothing when there is no match

* try to set lowercase constants without toLowerCase method

* Added full list of handles for empty Resource Type search option

* refactored empty searchQueries handling and added comment for invalid resourcetype search inputs

* Updating UI tests after import (#887)

Co-authored-by: Matus Kasak <[email protected]>

* UFAL/Show openaire input field every time the EU funding type is selected (#897)

* Show openaire input field every time the EU type is selected

* UFAL/Publisher search redirect not work #880 (#904)

Co-authored-by: milanmajchrak <[email protected]>

* Ufal/commits from ok lindat (#903)

* copied static content

that was not already in cs/.

Otherwise license page (when without .html) might show an error when UI
is in Czech and there's no translation.

(cherry picked from commit 9e7eea0)

* Update header.component.html

I'm expecting the image to take me to lindat.cz. There's no other obvious way to navigate out of the repository

* This is the change from ufal/clarin-dspace@5fc2414

but applied on v7

* Adding a note about the proprietor change

---------

Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Michal Kren <[email protected]>

* UFAL/show-no-spinner-when-item-has-no-files (#902)

* show msg about no files when item has no files, show no spinenr

* check if files are array

* check files size

* fix error

* optimize template with hasNoFiles flag

* used behaviourSubject for hasNoFiles / aynchronous

* Trigger automated ui tests (#905)

* Created trigger for running UI tests for each customer daily

* Corrected spaces

* Changed name of the tests

---------

Co-authored-by: Matus Kasak <[email protected]>

* UFAL/License agreement loading spinner after submitting (#892)

* Added loading spinner icon after 'I agree' button is clicked

* Removed type annotation and rephrased comment

* Changes isLoading to async object

* Edited loading spinner visibility method - consistency fix

* UFAL/User cannot see his submission (#910)

* The user always see it's submissions page

---------

Co-authored-by: Paurikova2 <[email protected]>

* Changed runner in playwright tests (#914)

Co-authored-by: Matus Kasak <[email protected]>

* Skipping some customer branches in trigger playwright tests (#918)

Co-authored-by: Matus Kasak <[email protected]>

* UFAL/Return to pool issue (#922)

* UFAL/Shibboleth redirect to item without permission - not login page but 403  (#920)

* Updated retrieving the dso object - redirect to 403 instead of login page. Check if the user is signed in.

* Updated commend and fixed eslint warning

* UFAL/The editor cannot download the workflows bitstream (#924)

* Added `authorization-token` to the request, so the user could be identified in the BE context

* Added notification error when downloading has failed

* UFAL/Cherry-pick - update the static licenses

were missing an update in the czech translation.

Co-authored-by: Ondrej Kosarko <[email protected]>

* UFAL/Upgrade the refbox component - the content is fetched from the BE (#930)

* Fetch the refbox content from the BE

* Show an error that the refbox content wasn't properly fetched when some error

* Sanitize the code from the BE. Show errors and proper messages when something has failed

* Load item name in on init

* Secure the refbox content using SafeHtml

* Make refbox variable name consistent

* Refactor fetching refbox string from the SafeHtml

---------

Co-authored-by: Paurikova2 <[email protected]>
Co-authored-by: Jozef Misutka <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Matus Kasak <[email protected]>
Co-authored-by: jurinecko <[email protected]>
Co-authored-by: Juraj Roka <[email protected]>
Co-authored-by: Tim Donohue <[email protected]>
Co-authored-by: Paurikova2 <[email protected]>
Co-authored-by: Ondřej Košarko <[email protected]>
Co-authored-by: Marvin <[email protected]>
Co-authored-by: Milan Kuchtiak <[email protected]>
Co-authored-by: Kasinhou <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Ondrej Kosarko <[email protected]>
Co-authored-by: Michal Kren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UFAL/Filename encoding encodes the fileName with the rest of the URL

3 participants