Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : Inserted images/videos aren't considred as a content in news - EXO-65311 #905

Merged
merged 8 commits into from
Aug 15, 2023

Conversation

sofyenne
Copy link
Member

@sofyenne sofyenne commented Aug 9, 2023

Before this change, when a user inserted an image or a video into the body of the news during the creation or modification process, the post button would be disabled. After this change, the post button is enabled when the news body isn't empty and the update button is enabled when a new content is inserted.

@exo-swf exo-swf added the partialCIBuild Perform Partial CI Build label Aug 9, 2023
@sofyenne sofyenne requested a review from ahamdi August 10, 2023 08:29
@@ -395,23 +395,29 @@ export default {
editMode: function() {
return this.activityId && this.activityId !== '';
},
hasMediaContent() {
const parsedDocument = new DOMParser().parseFromString(this.news.body, 'text/html');
const mediaElements = parsedDocument.querySelectorAll('img, video, iframe');
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately this is still insufficient as it is limited to those tags and does not cover all possible HTML tags that could be added (svg, canva, audio, etc ...) even if it not the case now, but everytime a new tag is allowed, we will have to update the fix.
I prefer doing comparison of raw HTML content

@sofyenne sofyenne force-pushed the Task/65311 branch 2 times, most recently from 2b2d91a to 88f99b3 Compare August 11, 2023 16:36
@exo-swf exo-swf marked this pull request as draft August 13, 2023 20:12
@exo-swf
Copy link
Contributor

exo-swf commented Aug 13, 2023

Your PR triggers too many exo-ci builds! Please finish your work and then, set your PR ready! Thank you

aycherif and others added 4 commits August 13, 2023 23:17
…upload for non members - EXO-65111 (#874)

This change is going to display the published news images selected from existing upload for non space members.
…play - EXO-65200 (#906)

Prior to this change, when create news in three different space, go to news app, open hamburger drawer besides posted articles
unselect all spaces and select only one space , copy the UI url and paste it in a new taw on notice the filter glitches, all news are displayed. After this change, the filter is already mentioned in the url.
@sonarcloud
Copy link

sonarcloud bot commented Aug 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sofyenne sofyenne merged commit 96b57b2 into feature/maintenance Aug 15, 2023
4 checks passed
@sofyenne sofyenne deleted the Task/65311 branch August 15, 2023 10:10
sofyenne added a commit that referenced this pull request Aug 15, 2023
…XO-65311 (#905)

Before this change, when a user inserted an image or a video into the body of the news during the creation or modification process, the post button would be disabled. After this change, the post button is enabled when the news body isn't empty and the update button is enabled when a new content is inserted.
sofyenne added a commit that referenced this pull request Aug 15, 2023
…XO-65311 (#905)

Before this change, when a user inserted an image or a video into the body of the news during the creation or modification process, the post button would be disabled. After this change, the post button is enabled when the news body isn't empty and the update button is enabled when a new content is inserted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
partialCIBuild Perform Partial CI Build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants