mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
Compile UI improvements for beta release (#3644)
* Increase errors cap in the new compile UI to 99 * Improve messaging for stopped compiles GitOrigin-RevId: d34973e9ef71562d64cfc8018634753e47e4dee8
This commit is contained in:
parent
58b8ac3775
commit
326c63e2af
3 changed files with 10 additions and 6 deletions
|
@ -5,6 +5,8 @@ import classNames from 'classnames'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import Icon from '../../../shared/components/icon'
|
||||
|
||||
const MAX_ERRORS_COUNT = 99
|
||||
|
||||
function PreviewLogsToggleButton({
|
||||
onToggle,
|
||||
showLogs,
|
||||
|
@ -100,7 +102,9 @@ function LogsCompilationResultIndicator({ textStyle, logType, nLogs }) {
|
|||
aria-label={label}
|
||||
style={textStyle}
|
||||
>
|
||||
{`${label} (${nLogs > 9 ? '9+' : nLogs})`}
|
||||
{`${label} (${
|
||||
nLogs > MAX_ERRORS_COUNT ? `${MAX_ERRORS_COUNT}+` : nLogs
|
||||
})`}
|
||||
</span>
|
||||
</>
|
||||
)
|
||||
|
|
|
@ -637,7 +637,7 @@
|
|||
"if_you_are_registered": "If you are already registered",
|
||||
"stop_compile": "Stop compilation",
|
||||
"terminated": "Compilation cancelled",
|
||||
"compile_terminated_by_user": "The compile was cancelled using the 'Stop Compilation' button. You can view the raw logs to see where the compile stopped.",
|
||||
"compile_terminated_by_user": "The compile was cancelled using the 'Stop Compilation' button. You can download the raw logs to see where the compile stopped.",
|
||||
"site_description": "An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.",
|
||||
"knowledge_base": "knowledge base",
|
||||
"contact_message_label": "Message",
|
||||
|
@ -1345,4 +1345,4 @@
|
|||
"add_email_to_claim_features": "Add an institutional email address to claim your features.",
|
||||
"please_change_primary_to_remove": "Please change your primary email in order to remove",
|
||||
"dropbox_duplicate_project_names": "We detected an update from Dropbox to <0>__projectName__</0>, but you have multiple projects with that name. We are unable to process this, so have unlinked your Dropbox account. Please ensure your project names are unique across your active, archived and trashed projects, and then re-link your Dropbox account."
|
||||
}
|
||||
}
|
|
@ -83,14 +83,14 @@ describe('<PreviewLogsToggleButton />', function() {
|
|||
screen.getByText(`View warnings (${logsState.nWarnings})`)
|
||||
})
|
||||
|
||||
it('should render 9+ errors when there are more than nine errors', function() {
|
||||
it('should render 99+ errors when there are more than 99 errors', function() {
|
||||
const logsState = {
|
||||
nErrors: 10,
|
||||
nErrors: 100,
|
||||
nWarnings: 0,
|
||||
nLogEntries: 0
|
||||
}
|
||||
renderPreviewLogsToggleButton(logsState, onToggleLogs, showLogs)
|
||||
screen.getByText('This project has errors (9+)')
|
||||
screen.getByText('This project has errors (99+)')
|
||||
})
|
||||
it('should show the button text when prop showText=true', function() {
|
||||
const logsState = {
|
||||
|
|
Loading…
Reference in a new issue