mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: webview redirection logs & description rendering (#2433)
* fix: redirection console logs * fix: sub issues overflow * fix: cycle bottom sheet typo * fix: description rendering * fix: formatting
This commit is contained in:
parent
651b252c23
commit
ceb878e72f
@ -235,7 +235,7 @@ const activityDetails: {
|
||||
JSON.stringify({
|
||||
cycle_id: activity.new_identifier ?? activity.old_identifier,
|
||||
project_id: activity.project,
|
||||
cycle_name: activity.verb === "created" ? activity.new_value : activity.old_value,
|
||||
cycle_name: !activity.new_value || activity.new_value === "" ? activity.old_value : activity.new_value,
|
||||
})
|
||||
)
|
||||
}
|
||||
@ -355,7 +355,7 @@ const activityDetails: {
|
||||
JSON.stringify({
|
||||
module_id: activity.new_identifier ?? activity.old_identifier,
|
||||
project_id: activity.project,
|
||||
module_name: activity.verb === "created" ? activity.new_value : activity.old_value,
|
||||
module_name: !activity.new_value || activity.new_value === "" ? activity.old_value : activity.new_value,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
@ -232,6 +232,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
||||
JSON.stringify({
|
||||
issue_id: relation.issue_detail?.id,
|
||||
project_id: relation.issue_detail?.project_detail.id,
|
||||
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||
})
|
||||
)
|
||||
}
|
||||
@ -294,6 +295,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
||||
JSON.stringify({
|
||||
issue_id: relation.issue_detail?.id,
|
||||
project_id: relation.issue_detail?.project_detail.id,
|
||||
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||
})
|
||||
)
|
||||
}
|
||||
@ -356,6 +358,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
||||
JSON.stringify({
|
||||
issue_id: relation.issue_detail?.id,
|
||||
project_id: relation.issue_detail?.project_detail.id,
|
||||
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||
})
|
||||
)
|
||||
}
|
||||
@ -418,6 +421,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
||||
JSON.stringify({
|
||||
issue_id: relation.issue_detail?.id,
|
||||
project_id: relation.issue_detail?.project_detail.id,
|
||||
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||
})
|
||||
)
|
||||
}
|
||||
|
@ -115,8 +115,9 @@ export const IssueWebViewForm: React.FC<Props> = (props) => {
|
||||
<Controller
|
||||
name="description_html"
|
||||
control={control}
|
||||
render={({ field: { value, onChange } }) => (
|
||||
<RichTextEditor
|
||||
render={({ field: { value, onChange } }) => {
|
||||
if(value==null)return <></>;
|
||||
return <RichTextEditor
|
||||
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}
|
||||
deleteFile={fileService.deleteImage}
|
||||
value={
|
||||
@ -136,7 +137,7 @@ export const IssueWebViewForm: React.FC<Props> = (props) => {
|
||||
handleSubmit(handleDescriptionFormSubmit)().finally(() => setIsSubmitting("submitted"));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
className={`absolute right-5 bottom-5 text-xs text-custom-text-200 border border-custom-border-400 rounded-xl w-[6.5rem] py-1 z-10 flex items-center justify-center ${
|
||||
|
@ -97,7 +97,11 @@ export const CycleSelect: React.FC<Props> = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<WebViewModal isOpen={isBottomSheetOpen} onClose={() => setIsBottomSheetOpen(false)} modalTitle="Select Module">
|
||||
<WebViewModal
|
||||
isOpen={isBottomSheetOpen}
|
||||
onClose={() => setIsBottomSheetOpen(false)}
|
||||
modalTitle="Select Cycle"
|
||||
>
|
||||
<WebViewModal.Options
|
||||
options={[
|
||||
...(incompleteCycles ?? []).map((cycle) => ({
|
||||
|
@ -121,11 +121,11 @@ export const SubIssueList: React.FC<Props> = (props) => {
|
||||
|
||||
{subIssuesResponse?.sub_issues?.map((subIssue) => (
|
||||
<div key={subIssue.id} className="flex items-center justify-between gap-2 py-2">
|
||||
<div className="flex items-center">
|
||||
<div className="grid grid-flow-col ">
|
||||
<p className="mr-3 text-sm text-custom-text-300">
|
||||
{subIssue.project_detail.identifier}-{subIssue.sequence_id}
|
||||
</p>
|
||||
<p className="text-sm font-normal">{subIssue.name}</p>
|
||||
<p className="text-sm font-normal truncate ">{subIssue.name}</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
|
@ -54,16 +54,14 @@ const Editor: NextPage = () => {
|
||||
<Controller
|
||||
name="data_html"
|
||||
control={control}
|
||||
render={({ field: { value, onChange } }) => (
|
||||
render={({ field: { value, onChange } }) => {
|
||||
if (value == null) return <></>;
|
||||
return (
|
||||
<RichTextEditor
|
||||
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}
|
||||
deleteFile={fileService.deleteImage}
|
||||
borderOnFocus={false}
|
||||
value={
|
||||
!value || value === "" || (typeof value === "object" && Object.keys(value).length === 0)
|
||||
? watch("data_html")
|
||||
: value
|
||||
}
|
||||
value={!value || value === "" ? "<p></p>" : value}
|
||||
noBorder={true}
|
||||
customClassName="h-full shadow-sm overflow-auto"
|
||||
editorContentCustomClassNames="pb-9"
|
||||
@ -73,7 +71,8 @@ const Editor: NextPage = () => {
|
||||
setValue("data", JSON.stringify(description));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{isEditable && (
|
||||
<Button
|
||||
|
Loading…
Reference in New Issue
Block a user