<commit_before>///
// Dependencies
///

import React, { Component } from 'react';
import classNames from 'classnames';

import AdvancedLink from './AdvancedLink';
import Imagicon from './Imagicon';
import NoWrapEllipse from './NoWrapEllipse';


///
// View
///

class CardsListItemView extends Component {
	widthClass() {
		if(! this.props.width) return [];

		return 'width-' + this.props.width;
	}

	layoutClass() {
		return this.props.horizontal ? 'horizontal' : [];
	}

	classNames() {
		return classNames(
			'cards-list-item-outer',
			this.widthClass(),
			this.layoutClass(),
		);
	}

	render() {
		return (
			<li className={this.classNames()}>
				<AdvancedLink to={this.props.item.get('href')}>
					&nbsp;
				</AdvancedLink>
				<div className="cards-list-item-inner">
					<div className="logo-container">
						<Imagicon
							className="logo"
							src={this.props.item.get('logoUrl')}
							alt={this.props.alt || "Logo"}
							altIcon={this.props.defaultLogoIcon || 'question-circle'}
							size="m"
						/>
					</div>
					<div className="text-container">
						<div className="title">
							<NoWrapEllipse>
								{this.props.item.get('name')}
							</NoWrapEllipse>
						</div>
						<div className="contents">
							{this.props.children}
						</div>
					</div>
				</div>
			</li>
		);
	}
}

export default CardsListItemView;
<commit_msg>Removing no wrap ellipse for card titles and making titles optional<commit_after>///
// Dependencies
///

import React, { Component } from 'react';
import classNames from 'classnames';

import AdvancedLink from './AdvancedLink';
import Imagicon from './Imagicon';


///
// View
///

class CardsListItemView extends Component {
	///
	// Methods
	///

	widthClass() {
		if(! this.props.width) return [];

		return 'width-' + this.props.width;
	}

	layoutClass() {
		return this.props.horizontal ? 'horizontal' : [];
	}

	classNames() {
		return classNames(
			'cards-list-item-outer',
			this.widthClass(),
			this.layoutClass(),
		);
	}


	///
	// Rendering
	///

	renderTitle() {
		const title = this.props.item.get('name');

		if(! title) {
			return '';
		}

		return (
			<div className="title">
				{title}
			</div>
		);
	}

	render() {
		return (
			<li className={this.classNames()}>
				<AdvancedLink to={this.props.item.get('href')}>
					&nbsp;
				</AdvancedLink>
				<div className="cards-list-item-inner">
					<div className="logo-container">
						<Imagicon
							className="logo"
							src={this.props.item.get('logoUrl')}
							alt={this.props.alt || "Logo"}
							altIcon={this.props.defaultLogoIcon || 'question-circle'}
							size="m"
						/>
					</div>
					<div className="text-container">
						{this.renderTitle()}
						<div className="contents">
							{this.props.children}
						</div>
					</div>
				</div>
			</li>
		);
	}
}

export default CardsListItemView;

{'fraction_non_alphanumeric': 0.1733983286908078, 'fraction_numerical': 0.0, 'mean_word_length': 2.669220945083014, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2620379', 'n_tokens_mistral': 1238, 'n_tokens_neox': 945, 'n_words': 183}