-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add empty state in generic description #798
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
Merged
+291
−249
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b627614
feat: export useAnimationControls
Elessar1802 3941f2f
chore: bump version
Elessar1802 b63f411
Merge pull request #788 from devtron-labs/fix/ai
Elessar1802 37756ec
chore(version): bump to 1.16.0
RohitRaj011 6b918e8
Merge pull request #794 from devtron-labs/rc-merge/v0.38.0
RohitRaj011 2f8d719
Merge pull request #795 from devtron-labs/release-candidate-v0.38.0
RohitRaj011 5062ee9
feat: add empty state in generic description
arunjaindev b14bc56
Merge branch 'main' of https://github.com/devtron-labs/devtron-fe-com…
arunjaindev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
/* | ||
* Copyright (c) 2024. Devtron Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import Tippy from '@tippyjs/react' | ||
import moment from 'moment' | ||
|
||
import { ReactComponent as BoldIcon } from '@Icons/ic-bold.svg' | ||
import { ReactComponent as CheckedListIcon } from '@Icons/ic-checked-list.svg' | ||
import { ReactComponent as CodeIcon } from '@Icons/ic-code.svg' | ||
import { ReactComponent as HeaderIcon } from '@Icons/ic-header.svg' | ||
import { ReactComponent as ImageIcon } from '@Icons/ic-image.svg' | ||
import { ReactComponent as ItalicIcon } from '@Icons/ic-italic.svg' | ||
import { ReactComponent as LinkIcon } from '@Icons/ic-link.svg' | ||
import { ReactComponent as OrderedListIcon } from '@Icons/ic-ordered-list.svg' | ||
import { ReactComponent as QuoteIcon } from '@Icons/ic-quote.svg' | ||
import { ReactComponent as StrikethroughIcon } from '@Icons/ic-strikethrough.svg' | ||
import { ReactComponent as UnorderedListIcon } from '@Icons/ic-unordered-list.svg' | ||
import { DATE_TIME_FORMATS, ZERO_TIME_STRING } from '@Common/Constants' | ||
import { logExceptionToSentry } from '@Common/Helper' | ||
import { MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT, MARKDOWN_EDITOR_COMMAND_TITLE } from '@Common/Markdown/constant' | ||
|
||
export const getParsedUpdatedOnDate = (updatedOn: string) => { | ||
if (!updatedOn || updatedOn === ZERO_TIME_STRING) { | ||
return '' | ||
} | ||
|
||
const _moment = moment(updatedOn) | ||
|
||
return _moment.isValid() ? _moment.format(DATE_TIME_FORMATS.TWELVE_HOURS_FORMAT) : updatedOn | ||
} | ||
|
||
export const getEditorCustomIcon = (commandName: string): JSX.Element => { | ||
switch (commandName) { | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.HEADER: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<HeaderIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.BOLD: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<BoldIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.ITALIC: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<ItalicIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.STRIKETHROUGH: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<StrikethroughIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.LINK: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<LinkIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.QUOTE: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<QuoteIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.CODE: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<CodeIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.IMAGE: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<ImageIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.UNORDERED_LIST: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<UnorderedListIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.ORDERED_LIST: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<OrderedListIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
case MARKDOWN_EDITOR_COMMAND_TITLE.CHECKED_LIST: | ||
return ( | ||
<Tippy | ||
className="default-tt" | ||
arrow={false} | ||
placement="bottom" | ||
content={MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT[commandName]} | ||
> | ||
<div className="flex"> | ||
<CheckedListIcon className="icon-dim-16 flex" /> | ||
</div> | ||
</Tippy> | ||
) | ||
default: | ||
logExceptionToSentry('Invalid command for MDE') | ||
return null | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import { animate, AnimatePresence, motion, useMotionTemplate, useMotionValue } from 'framer-motion' | ||
import { | ||
animate, | ||
AnimatePresence, | ||
motion, | ||
useAnimationControls, | ||
useMotionTemplate, | ||
useMotionValue, | ||
} from 'framer-motion' | ||
|
||
export { animate, AnimatePresence, motion, useMotionTemplate, useMotionValue } | ||
export { animate, AnimatePresence, motion, useAnimationControls, useMotionTemplate, useMotionValue } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.